Java MulticastSocket getNetworkInterface()

getNetworkInterface() is the method of MulticastSocket class. This method is used to set the multicast interface.

Syntax

Returns

It returns the multicast NetworkInterface currently set.

Throw

SocketException - this exception occurs in the underlying protocol

Example 1

Test it Now

Output:

Network Inteface : name:lo (Software Loopback Interface 1)




Latest Courses