RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClientSocket.OnConnecting Event

Occurs for a client socket after the server socket has been located, but before the connection is established.

Pascal
property OnConnecting: TSocketNotifyEvent;
C++
__property TSocketNotifyEvent OnConnecting;

Write an OnConnecting event handler for a client socket to take specific action just before the connection to a server socket is established. This is the first opportunity to obtain the actual port and IP address of the server endpoint of the connection that is about to form. 

When a client socket opens a connection, the following events occur:  

1An OnLookup event occurs prior to an attempt to locate the server socket.  

2The Windows socket is set up, and initialized for event notification.  

3An OnConnecting event occurs after the server socket is located.  

4The connection request is accepted by the server and completed by the client socket.  

5An OnConnect event occurs after the connection is established. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!