| Package | Description |
|---|---|
| java.net |
Provides the classes for implementing networking applications.
|
| java.nio.channels |
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
|
| Modifier and Type | Field and Description |
|---|---|
static SocketOption |
StandardSocketOptions.IP_MULTICAST_IF
The network interface for Internet Protocol (IP) multicast datagrams.
|
| Modifier and Type | Method and Description |
|---|---|
static NetworkInterface |
NetworkInterface.getByIndex(int index)
Get a network interface given its index.
|
static NetworkInterface |
NetworkInterface.getByInetAddress(InetAddress
Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.
|
static NetworkInterface |
NetworkInterface.getByName(String
Searches for the network interface with the specified name.
|
NetworkInterface |
MulticastSocket.getNetworkInterface()
Get the multicast network interface set.
|
NetworkInterface |
NetworkInterface.getParent()
Returns the parent NetworkInterface of this interface if this is a subinterface, or
null if it is a physical (non virtual) interface or has no parent.
|
NetworkInterface |
Inet6Address.getScopedInterface()
Returns the scoped interface, if this instance was created with with a scoped interface.
|
| Modifier and Type | Method and Description |
|---|---|
static Enumeration |
NetworkInterface.getNetworkInterfaces()
Returns all the interfaces on this machine.
|
Enumeration |
NetworkInterface.getSubInterfaces()
Get an Enumeration with all the subinterfaces (also known as virtual interfaces) attached to this network interface.
|
| Modifier and Type | Method and Description |
|---|---|
static Inet6Address |
Inet6Address.getByAddress(String
Create an Inet6Address in the exact manner of
InetAddress except that the IPv6 scope_id is set to the value corresponding to the given interface for the address type specified in
addr.
|
boolean |
InetAddress.isReachable(NetworkInterface
Test whether that address is reachable.
|
void |
MulticastSocket.joinGroup(SocketAddress
Joins the specified multicast group at the specified interface.
|
protected abstract void |
DatagramSocketImpl.joinGroup(SocketAddress
Join the multicast group.
|
void |
MulticastSocket.leaveGroup(SocketAddress
Leave a multicast group on a specified local interface.
|
protected abstract void |
DatagramSocketImpl.leaveGroup(SocketAddress
Leave the multicast group.
|
void |
MulticastSocket.setNetworkInterface(NetworkInterface
Specify the network interface for outgoing multicast datagrams sent on this socket.
|
| Modifier and Type | Method and Description |
|---|---|
abstract NetworkInterface |
MembershipKey.networkInterface()
Returns the network interface for which this membership key was created.
|
| Modifier and Type | Method and Description |
|---|---|
MembershipKey |
MulticastChannel.join(InetAddress
Joins a multicast group to begin receiving all datagrams sent to the group, returning a membership key.
|
MembershipKey |
MulticastChannel.join(InetAddress
Joins a multicast group to begin receiving datagrams sent to the group from a given source address.
|