Midware TAppServer.OnClientCommand

From Overbyte
Jump to navigation Jump to search

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.