From RAD Studio API Documentation
Jump to: navigation, search


property OnClientError: TSocketErrorEvent read GetOnClientError write SetOnClientError;


__property TSocketErrorEvent OnClientError = {read=GetOnClientError, write=SetOnClientError};


Type Visibility Source Unit Parent
event protected
System.Win.ScktComp TCustomServerSocket


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

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

Note: If ServerType is stThreadBlocking, make sure that all code in an OnClientError event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.

Note: The OnClientError event handler for TServerSocket is also set when setting the OnClientError event handler of the associated TServerWinSocket.

See Also