System.Win.ScktComp.TCustomSocket.OnAccept

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnAccept: TSocketNotifyEvent read FOnAccept write FOnAccept;

C++

__property TSocketNotifyEvent OnAccept = {read=FOnAccept, write=FOnAccept};

Properties

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

Description

Occurs on server sockets just after the connection to a client socket is accepted.

Write an OnAccept event handler for a server socket to take specific action after the connection to a client socket has been accepted. This is the first point when information is available about the local port and IP address that will be used in the server endpoint of the connection. The port number, and possibly the IP address, will differ from those of the listening socket.

Server sockets open a socket connection for listening to establish a queue to hold client requests. After a request from the queue is accepted by the server socket, an OnAccept event occurs. After the server socket accepts the connection, the client socket completes the connection, and an OnConnect event occurs for the client socket.

See Also