System.Win.ScktComp.TServerSocket.OnListen

From RAD Studio API Documentation

Delphi

property OnListen: TSocketNotifyEvent read FOnListen write FOnListen;

C++

__property OnListen;

Properties

Type Visibility Source Unit Parent
event published
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TServerSocket

Description

Occurs just before a server socket is opened for listening. {{#multireplace:System.Win.ScktComp.TServerSocket.OnListen|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.Win.ScktComp.TCustomSocket.OnListen|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:System.Win.ScktComp.TCustomSocket.OnListen|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.

Occurs just before a server socket is opened for listening.

Write an OnListen event handler for a server socket to take specific action just before the socket is opened for listening. OnListen occurs after Address and Port have been bound to the socket connection, but before it is opened. This is the last opportunity to make changes to the socket endpoint before it is opened for listening. Use the SocketHandle property of the Socket parameter for Windows API calls that change the socket.

Server sockets open a socket connection for listening to establish a queue to hold client requests. The connection to a client socket is completed when a request from the queue is accepted.

See Also