Difference between revisions of "Midware TAppSrvClient"

From Overbyte
Jump to navigation Jump to search
Line 60: Line 60:
  
 
{|
 
{|
| width="140" valign="top" | [[Midware_TAppSrvClient.OnAfterProcessReply | OnAfterProcessReply]] |||| Use to cleanup allocated resources in the OnBeforeProcessReply event handler.
+
| width="140" valign="top" | [[Midware_TAppSrvClient.OnAfterProcessReply | OnAfterProcessReply]] |||| Occurs after a reply has been processed.
 
|-
 
|-
 
| valign="top" | [[Midware_TAppSrvClient.OnAfterSendRequest | OnAfterSendRequest]] |||| The OnAfterSendReply event is called once the reply header and body has ben written to the internal buffer for sending in the background.
 
| valign="top" | [[Midware_TAppSrvClient.OnAfterSendRequest | OnAfterSendRequest]] |||| The OnAfterSendReply event is called once the reply header and body has ben written to the internal buffer for sending in the background.

Revision as of 09:39, 14 May 2011

Main page -> Midware component reference -> TAppSrvClient

Overview

unit ApsCli.pas

TAppSrvClient is used on the client side to connect to the application server. His main purpose is to send a request to the application server and receive answers from the application server. TAppSrvClient establish and manage connection and dialog with MidWare application server.

Properties

Answer The Answer property holds the answer from the application server.
Handle The handle for the hidden window used to send and receive internal messages for component work.
AnswerStatus The AnswerStatus property hold the ResultStatus returned back by the application server.
Connected The connected property tell if connection with the server is alive.
FunctionCode The function code is a string which is used by the application server to know which server object to instanciate to execute the request.
Port This is the port number used by the server to listen for clients.
Request The request property holds the parameters sent to the application server.
RequestBody RequestBody gives the address where the message body is stored just before sending it to the application server.
RequestBodyLen RequestBodyLen gives the message body length just before sending it to the application server.
RequestHeader RequestHeader gives the address where the message header is stored just before sending it to the application server.
RequestHeaderLen RequestHeaderLen gives the message header length just before sending it to the application server.
Server This is the IP address or hostname for the application server.
SocksAuthentication SocksAuthentication specifies which socks5 authentication method to use.
SocksPassword SocksPassword is the password used for Socks5 connection.
SocksPort Socks5 port number.
SocksServer IP or hostname for socks5 server.
SocksUsercode Socks5 usercode.
Stade State property gives the component state:
WSocket WSocket is the reference to the underlaiying TWSocket component used for communication with the application server.

Methods

Close Close the communication with the application server.
Send Send a FunctionCode and Request (parmeters) to the application server.

Events

OnAfterProcessReply Occurs after a reply has been processed.
OnAfterSendRequest The OnAfterSendReply event is called once the reply header and body has ben written to the internal buffer for sending in the background.
OnBeforeProcessReply The event OnBeforeProcessReply is triggered when a reply have been received from the server, just before it is processed for header and body extraction.
OnBannerRcdv The event handler could be used to verify the received banner to be sure we are connected to the right server, or to display it for the user, or to log it to a log file.
OnBeforeSendRequest
OnRequestDone When the application server sent the answer to the client, the OnRequestdone event is triggered.
OnSessionClosed The event OnSessionConnected is triggered when the connection has been closed.
OnSessionConnected The event OnSessionConnected is triggered when the connection has been established with the application server.
OnSocksAuthState OnSocksAuthState event is triggered for each state in socks authentication process.
OnSocksConnected The event OnSocksConnected is triggered when the connection has been established with the socks server.
OnSocksError OnSocksError event is triggered when an error related to socks connection has been detected.

How to


Midware Components Reference