Uses of Class
Provides the classes for implementing networking applications.
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.
Uses of NetworkInterface in java.netModifier and TypeFieldDescriptionStandardSocketOptions.The network interface for Internet Protocol (IP) multicast datagrams.Modifier and TypeMethodDescriptionNetworkInterface.
(int index)Get a network interface given its index.NetworkInterface.
InetAddress addr)(Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.NetworkInterface.
String name)(Searches for the network interface with the specified name.MulticastSocket.
()Get the multicast network interface set.NetworkInterface.
()Returns the parent NetworkInterface of this interface if this is a subinterface, or
nullif it is a physical (non virtual) interface or has no parent.Inet6Address.
()Returns the scoped interface, if this instance was created with a scoped interface.Modifier and TypeMethodDescriptionNetworkInterface.
Enumerationof all the interfaces on this machine.NetworkInterface.
()Get an Enumeration with all the subinterfaces (also known as virtual interfaces) attached to this network interface.NetworkInterface.
Streamof all the interfaces on this machine.NetworkInterface.
()Get a Stream of all subinterfaces (also known as virtual interfaces) attached to this network interface.Modifier and TypeMethodDescription
static Inet6AddressCreate an Inet6Address in the exact manner of
InetAddress.getByAddress(String,byte)except that the IPv6 scope_id is set to the value corresponding to the given interface for the address type specified in
NetworkInterface netif, int ttl, int timeout)(Test whether that address is reachable.
protected abstract voidJoin the multicast group.
voidJoins the specified multicast group at the specified interface.
protected abstract voidLeave the multicast group.
voidLeave a multicast group on a specified local interface.
NetworkInterface netIf)(Specify the network interface for outgoing multicast datagrams sent on this socket.
Uses of NetworkInterface in java.nio.channelsModifier and TypeMethodDescription
()Returns the network interface for which this membership key was created.Modifier and TypeMethodDescriptionJoins a multicast group to begin receiving all datagrams sent to the group, returning a membership key.Joins a multicast group to begin receiving datagrams sent to the group from a given source address.