Module java.base
Package java.net

Class InetSocketAddress

java.lang.Object
java.net.SocketAddress
java.net.InetSocketAddress
All Implemented Interfaces:
Serializable

public class InetSocketAddress extends SocketAddress
This class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname. If resolution fails then the address is said to be unresolved but can still be used on some circumstances like connecting through a proxy.

It provides an immutable object used by sockets for binding, connecting, or as returned values.

The wildcard is a special local IP address. It usually means "any" and can only be used for bind operations.

Since:
1.4
See Also: