System.Win.ScktComp.TCustomSocket.OnConnect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnConnect: TSocketNotifyEvent read FOnConnect write FOnConnect;

C++

__property TSocketNotifyEvent OnConnect = {read=FOnConnect, write=FOnConnect};

Properties

Type Visibility Source Unit Parent
event protected
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TCustomSocket

Description

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

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:

  1. An OnLookup event occurs prior to an attempt to locate the server socket.
  2. The Windows socket is set up, and initialized for event notification.
  3. An OnConnecting event occurs after the server socket is located.
  4. The connection request is accepted by the server and completed by the client socket.
  5. An OnConnect event occurs after the connection is established.

See Also