Bind the socket to a specific port.
Binding the socket to a port is necessary for being able to receive data on that port. You can use the special value Socket.AnyPort to tell the system to automatically pick an available port, and then call getLocalPort to retrieve the chosen port.
Port to bind the socket to
Status code.
See Implementation
Bind the socket to a specific port.
Binding the socket to a port is necessary for being able to receive data on that port. You can use the special value Socket.AnyPort to tell the system to automatically pick an available port, and then call getLocalPort to retrieve the chosen port.