I have two network interfaces(Wireless and Ethernet) for connection but I just want to send information to Ethernet, when i don’t have conecction in ethernet the multicast-socket can send the information by Wireless but i don’t want
I have two network interfaces(Wireless and Ethernet) for connection but I just want to
Share
You can bind your socket to the specific IP address of the adapter you want to use, using the
Socket#bind(SocketAddress endpoint)method.The
java.net.NetworkInterfaceclass can be used to enumerate the available interfaces and get their IP addresses.