Java MulticastSocket leaveGroup() MethodleaveGroup(InetAddress mcastaddr) is the method of MulticastSocket class. This method is used to leave multicast group. The behavior of the group can be affected by setInterface or setNetworkInterface. SyntaxParametermcastaddr - it is the multicast address to leave the group. ThrowIOException - this exception occurs whenever there is error while leaving or the address is not multicast address or the platform does not support multicasting. SecurityException - this exception occurs if a security manager exists and its checkMulticast method doesn't allow the join. Example 1Test it NowOutput: leaving group using leaveGroup method.... Next TopicJava MulticastSocket |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India