Topic Path: Symbol Reference > Classes > TIdSocketHandle Class > TIdSocketHandle Methods > Bind Method
ContentsIndexHome
PreviousUpNext
TIdSocketHandle.Bind Method

Binds the IP and Port number used for the socket handle local connection.

procedure Bind;

Bind is a procedure used to bind the socket handle for the connection to the IP and Port number used for the local system. 

If the application does not care what address is assigned to it, it may use a blank IP (''). This allows the protocol stack to assign the Internet address Id_INADDR_ANY, and an any appropriate network interface will be used. 

If the application does not care what port is assigned to it, it may use Port 0. This allows the protocol stack to assign a unique port to the application with a value between 1024 and 5000. 

Bind performs validation to ensure that an unassigned Port number for the local system conforms to the range specified in ClientPortMin and ClientPortMax, and is not a port number reserve or already in use. 

On succecssful completion of the method, UpdateBindingLocal will have been called to reflect the IP and port number to use for the connection.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.