RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClientSocket.OnConnect Event

Occurs on client sockets just after the connection to the server is opened.

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

Write an OnConnect event handler for a client socket to take specific action after the connection to a server socket has been established. Depending on the service, this may be the point when the socket should start reading or writing over the connection. 

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!