Java MulticastSocket setNetworkInterface() Method

setNetworkInterface() is the method of MulticastSocket class. This method is used for setting outgoing multicast datagrams sent on this socket.

Syntax

Parameter

netIf - it is the interface

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