/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }
/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }
/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }
/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }
/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }
/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }
/** * Returns the outgoing network interface used by this socket. * * @throws SocketException if an error occurs. */ public NetworkInterface getNetworkInterface() throws SocketException { checkOpen(); int index = (Integer) impl.getOption(SocketOptions.IP_MULTICAST_IF2); if (index != 0) { return NetworkInterface.getByIndex(index); } return NetworkInterface.forUnboundMulticastSocket(); }