TBlockSocket.Bind
TBlockSocket     

procedure Bind(IP, Port: string);

Unit
blcksock

Description
Connects socket to local IP address and PORT. IP address may be numeric or symbolic ('192.168.74.50', 'cosi.nekde.cz', 'ff08::1'). The same for PORT - it may be number or mnemonic port ('23', 'telnet').

If port value is 0, system chooses itself and conects unused port in the range 1024 to 4096. Structure LocalSin is filled after calling this method.

Note: If you call this on non-created socket, then socket is created automaticly.

Warning: when you call : Bind('0.0.0.0','0'); then is nothing done! In this case is used implicit system bind instead.


See also:
Connect, EnableReuse, Family, IP6used, LocalSin, PreferIP4