Choosing an IP address
Many hosts have more than one IP address.
By default, a server socket binds to all available IP addresses on a given port.
You can modify that behavior with this constructor:
public ServerSocket(int port, int backlog, InetAddress bindAddr)throws IOException
Back to first slide
View graphic version