RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerWinSocket.OnClientError Event

Occurs when a failure is encountered when establishing, using, or terminating the socket connection to an individual client socket.

Pascal
property OnClientError: TSocketErrorEvent;
C++
__property TSocketErrorEvent OnClientError;

Write an OnClientError event handler to respond to errors that arise with the connection to a client socket. Set the ErrorCode parameter to 0 if the OnClientError event handler successfully deals with the error condition, to prevent an ESocketError from being raised. 

The Sender parameter is the TServerWinClient object that received the client request. The Socket parameter is the TServerClientWinSocket object that manages the connection to the client. The ErrorEvent parameter indicates what Socket was attempting to do when the error occurred. The ErrorCode parameter is the error code returned by the Windows socket API call.

Note: If ServerType is stThreadBlocking, make sure that all code in an OnClientError event handler is thread-safe. Use the GetClientThread method to access thread-specific information.
Note: The OnClientError event handler for TServerWinSocket is also set when setting the OnClientError event handler of the associated TServerSocket.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!