Java Networking: Difference between revisions
Jump to navigation
Jump to search
Line 34: | Line 34: | ||
{{External|https://docs.oracle.com/javase/8/docs/api/java/net/NetworkInterface.html}} | {{External|https://docs.oracle.com/javase/8/docs/api/java/net/NetworkInterface.html}} | ||
The representation of a network interface available on the host. It is identified by a name, the same name returned by [[ifconfig -a]], if the host runs a Unix system. | |||
The instance can be used to get the list of addresses associated with the interface. | |||
NetworkInterface code in GitHub |
Revision as of 20:20, 15 March 2017
Internal
Concepts
InetAddress
This class represents an Internet Protocol (IP) address. Its subclasses represent either 32 bit IPv4 addresses (Inet4Address) or an 128 bit IPv6 addresses (Inet6Address)
Inet4Address
Inet6Address
SocketAddress
Is an immutable representation of a socket address. It does not have any association with any protocol. The values are used by sockets for binding, connecting or as returned values.
InetSocketAddress
Represents an IP socket address (IP address + port or hostname + port).
NetworkInterface
The representation of a network interface available on the host. It is identified by a name, the same name returned by ifconfig -a, if the host runs a Unix system.
The instance can be used to get the list of addresses associated with the interface.
NetworkInterface code in GitHub