Difference between revisions of "Midware TAppServer.OnClientCommand"

From Overbyte
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
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 ==

Latest revision as of 08:44, 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.