System.Win.ScktComp.TCustomSocket.OnLookup

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnLookup: TSocketNotifyEvent read FOnLookup write FOnLookup;

C++

__property TSocketNotifyEvent OnLookup = {read=FOnLookup, write=FOnLookup};

Properties

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

Description

Occurs when a client socket is about to look up the server socket with which it wants to connect.

Write an OnLookup event handler for a client socket to take specific action just before attempting to locate a server socket. This is the first opportunity to make Windows API calls that affect the client properties of the socket, such as specifying a particular port number. Use the SocketHandle property of the Socket parameter for Windows API calls.

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.

Note: Changing the Address, Host, Port, or Service properties of socket component in an OnLookup event handler has no effect on the address or port used to locate a server socket. These properties must be correct before the Open method is called.

See Also