RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAbstractSocket.Event Method

Provides the prototype of a method that responds when specific socket events occur.

Pascal
procedure Event(Socket: TCustomWinSocket; SocketEvent: TSocketEvent); virtual; abstract;
C++
virtual __fastcall Event(TCustomWinSocket Socket, TSocketEvent SocketEvent) = 0;

Descendants of TAbstractSocket must override the abstract or, in C++ terminology, pure virtual Event method to provide a response to calls that arise during the normal functioning of the socket. Applications cannot call Event. The Windows socket object calls Event at appropriate times.  

The Socket parameter indicates the Windows socket object that calls Event to indicate when specific events occur.  

The SocketEvent parameter indicates the event that occurred. It has one of the following values:  

Value 
Meaning 
seLookup  
(client sockets only) The Windows socket object is about to locate the server socket. Changing the properties of the client socket has no effect at this point, but changes to the Windows socket object specified by the Socket parameter will affect the attempted connection.  
seConnecting  
(client sockets only) The server socket has been located but the connection isn't completed. This is the first opportunity to obtain the actual server port and IP address used for the connection, which may differ from those of the listening socket contacted initially.  
seConnect  
The socket connection has just been established. This is the point when a socket starts reading or writing over the connection.  
seListen  
(server sockets only) The Windows socket object has been initialized and is about to open a listening connection. Changing the properties of the server socket has no effect at this point, but changes to the Windows socket object specified by the Socket parameter will the listening connection.  
seAccept  
(server sockets only) A client connection request has just been accepted. This is the first opportunity to obtain the port and IP address of the individual client connection.  
seWrite  
The socket is ready for information to be written.  
seRead  
The socket is receiving information from a socket on the other end of the connection.  

 

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