ScktComp.TServerWinSocket.OnClientError
Contents |
Delphi Information
From ScktComp.pas
property OnClientError: TSocketErrorEvent read FOnClientError write FOnClientError;
Unit: ScktComp
Type: event
Visibility: public
Member Of: TServerWinSocket
C++ Information
From ScktComp.hpp
__property TSocketErrorEvent OnClientError;
Unit: ScktComp
Type: property
Visibility: public
Member Of: TServerWinSocket
Description
Occurs when a failure is encountered when establishing, using, or terminating the socket connection to an individual client socket.
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.