BindSocket (open)

Bind a TCP/IP socket to an IP address and/or a port

Syntax

LOADLIB "wh::internet/tcpip.whlib";

BOOLEAN FUNCTION BindSocket(INTEGER connectionid, STRING host, INTEGER port)

Parameters

INTEGER connectionid

Connection ID to bind

STRING host

IP address or hostname to bind to, or empty for bind-anywhere

INTEGER port

Port to bind to, or 0 to bind to at any available port

Return value

BOOLEAN

True on a succesful bind, false on failure