RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ScktComp.TSocketErrorEvent Type

TSocketErrorEvent is the type for event handlers that respond when a Windows socket reports an error.

Pascal
TSocketErrorEvent = procedure (Sender: TObject; Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer) of object;
C++
(Sender: TObject; Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer) ( TSocketErrorEvent)();

ScktComp

The Sender parameter is the socket component that encountered the error.  

The Socket parameter is the TCustomWinSocket object that receives the error notification.  

The ErrorCode parameter is the error code returned by the Windows socket API call. Changing this to 0 within an error handler prevents an exception from being raised. 

The ErrorEvent parameter indicates what Socket was attempting to do when the error occurred. It is of type TErrorEvent, which can have any of the following values:

Value 
Meaning 
eeGeneral  
The socket received an error message that does not fit into any of the following categories.  
eeSend  
An error occurred when trying to write to the socket connection.  
eeReceive  
An error occurred when trying to read from the socket connection.  
eeConnect  
A connection request that was already accepted could not be completed.  
eeDisconnect  
An error occurred when trying to close a connection.  
eeAccept  
A problem occurred when trying to accept a client connection request.  

 

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