Difference between revisions of "Midware TAppServer.OnBeforeProcessRequest"
Jump to navigation
Jump to search
(Created page with ' Main page -> Midware component reference -> TAppServer -> [[Midware_TAppServer.OnBeforeProcessRequest | …') |
|||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
== Definition == | == Definition == | ||
+ | <syntaxhighlight lang="delphi"> | ||
+ | type | ||
+ | TProcessRequestEvent = procedure (Sender : TObject; | ||
+ | CliWSocket : TClientWSocket; | ||
+ | var CmdBuf : PChar; | ||
+ | var CmdLen : integer) of object; | ||
− | + | property OnBeforeProcessRequest : TProcessRequestEvent; | |
+ | </syntaxhighlight> | ||
== Description == | == Description == | ||
+ | |||
+ | Occurs before a client request is processed, just after it has been received. | ||
The OnBeforeProcessRequest event is triggered just before anything is done with a request received from the client. This is the right place to add code for decryption/decompression. If needed, the event handler can allocate memory or resources and change the values on the arguments (passed by var) to fit the requirement. Allocated resources must be freed from the OnAfterProcessCommand. | The OnBeforeProcessRequest event is triggered just before anything is done with a request received from the client. This is the right place to add code for decryption/decompression. If needed, the event handler can allocate memory or resources and change the values on the arguments (passed by var) to fit the requirement. Allocated resources must be freed from the OnAfterProcessCommand. |
Latest revision as of 08:25, 14 May 2011
Main page -> Midware component reference -> TAppServer -> OnBeforeProcessRequest
Definition
<syntaxhighlight lang="delphi"> type TProcessRequestEvent = procedure (Sender : TObject;
CliWSocket : TClientWSocket; var CmdBuf : PChar; var CmdLen : integer) of object;
property OnBeforeProcessRequest : TProcessRequestEvent; </syntaxhighlight>
Description
Occurs before a client request is processed, just after it has been received.
The OnBeforeProcessRequest event is triggered just before anything is done with a request received from the client. This is the right place to add code for decryption/decompression. If needed, the event handler can allocate memory or resources and change the values on the arguments (passed by var) to fit the requirement. Allocated resources must be freed from the OnAfterProcessCommand.