Matrix1 Utility Plug-ins

BIND SOCKET


Syntax

Status = BIND SOCKET ( Handle, PortNumber)
Status = BIND SOCKET ( Handle, IpAddress, PortNumber)

Description

This function associates a socket to a local address. If no IP address is specified, the socket will bind to all interfaces (in the case of a LISTEN SOCKET command) or force the choice a specific out-going interface (in the case of CONNECT SOCKET).

If this command is not used on a socket, then the windows socket system will choose a free port number - this is usually desired for a connecting socket, but not for a listening socket.

This function must be used on a socket before the socket is used for any purpose - if this is not done then the bind will fail.

Returns 1 for connection successful, or 0 for a failure

Go back to ...

Matrix1Util_28 Commands Menu
Matrix1 Utils Main Index
Matrix1 Utils Command List
Commands Menu
Main Menu

Copyright © Ian Mold - Matrix1 Software 2006 - 2011