Difference between revisions of "Midware TAppServer.OnBeforeSendReply"

From Overbyte
Jump to navigation Jump to search
(Created page with ' Main page -> Midware component reference -> TAppServer -> [[Midware_TAppServer.OnBeforeSendReply | OnBef…')
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
== Definition ==
 
== Definition ==
  
  '''property''' OnBeforeSendReply: '''TClientEvent''';
+
  <syntaxhighlight lang="delphi">
 +
type
 +
TClientEvent = procedure (Sender      : TObject;
 +
                          CliWSocket  : TClientWSocket) of object;
 +
 
 +
property OnBeforeSendReply : TClientEvent;
 +
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
 +
 +
Occurs just before a reply is sent to the client.
  
 
The OnBeforeSendReply event is called when a reply is ready to be transmitted to the client. A reply is made of a header and a body which are accessible thru the ClientWSocket property. The event has the possibility to process the header and body to encrypt or compress them. It can even allocate some memory for holding the processed header and body. Use the OnAfterSendReply to free any allocated memory. The processed data must *not* contains CR/LF pair as it is used by the client to delimit the reply. If processed data has CR/LF, then it must be escaped in some way.
 
The OnBeforeSendReply event is called when a reply is ready to be transmitted to the client. A reply is made of a header and a body which are accessible thru the ClientWSocket property. The event has the possibility to process the header and body to encrypt or compress them. It can even allocate some memory for holding the processed header and body. Use the OnAfterSendReply to free any allocated memory. The processed data must *not* contains CR/LF pair as it is used by the client to delimit the reply. If processed data has CR/LF, then it must be escaped in some way.

Latest revision as of 08:29, 14 May 2011

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

Definition

<syntaxhighlight lang="delphi">

type TClientEvent = procedure (Sender : TObject;

                         CliWSocket   : TClientWSocket) of object;

property OnBeforeSendReply : TClientEvent; </syntaxhighlight>

Description

Occurs just before a reply is sent to the client.

The OnBeforeSendReply event is called when a reply is ready to be transmitted to the client. A reply is made of a header and a body which are accessible thru the ClientWSocket property. The event has the possibility to process the header and body to encrypt or compress them. It can even allocate some memory for holding the processed header and body. Use the OnAfterSendReply to free any allocated memory. The processed data must *not* contains CR/LF pair as it is used by the client to delimit the reply. If processed data has CR/LF, then it must be escaped in some way.