Difference between revisions of "Midware TAppServer.OnClientCommand"

From Overbyte
Jump to navigation Jump to search
Line 3: Line 3:
 
== Definition ==
 
== Definition ==
  
'''property''' OnClientCommand: '''TClientCommandEvent''';
+
  <syntaxhighlight lang="delphi">
 +
type
 +
TClientCommandEvent = procedure (Sender    : TObject;
 +
                                CliWSocket : TClientWSocket;
 +
                                CmdBuf    : PChar;
 +
                                CmdLen    : LongInt) of object;
 +
 
 +
property OnClientCommand : TClientCommandEvent;
 +
</syntaxhighlight>
  
 
== Description ==
 
== Description ==

Revision as of 08:40, 14 May 2011

Main page -> Midware component reference -> TAppServer -> OnClientCommand

Definition

 <syntaxhighlight lang="delphi">

type TClientCommandEvent = procedure (Sender : TObject;

                                CliWSocket : TClientWSocket;
                                CmdBuf     : PChar;
                                CmdLen     : LongInt) of object;

property OnClientCommand : TClientCommandEvent; </syntaxhighlight>

Description

Occurs when a client's request is received, and before it is processed.

Clients connects to the server to send commands (also called requests) and wait for server responses. The OnClientCommand is triggered when such a command arrives, before it gets executed. The event handler can use the command for any purpose, it can even change it.