WINSOCK BIND CHANNEL
A server nearly always has a channel on which it listens for connections / packets from clients. To do this it must have a fixed port. Using this command you can specify on which port your channel will listen / send packets from. The port number is an integer in the range from 0 to 65535. The ports up to 1024 are reserved for system services and should not be used.
If using TCP then you can use this command to use an existing disconnected channel to listen on the specified port. Your TCP channel has to be disconnected, or your application will crash (or give an assertion message when using debug dll).
If using UDP then this command is vital. In a peer to peer network all nodes have to specify the port on which they "listen" for data. In a client/server architecture only the server needs to bind a channel, because the server will know the ip and port where a message came from and be able to respond.
You can optionally specify the local host to which you want your channel to be bound. Default is "0.0.0.0", allowing packets / connections from anywhere. If you only want to allow connections/messages from the localhost, specify "127.0.0.1" (for other networks respectively your machine IP on that network).
SYNTAX
WINSOCK BIND CHANNEL disconnected_channel as dword, [local_host as String,] local_port as integer
RELATED INFO
WINSOCK command menu
Index
EXAMPLE
Showcase-example 1
Showcase-example 2