Java MulticastSocket getTTL() methodgetTTL() is the method of MulticastSocket class. This method is used to get the default time-to-live for the multicast packets which are sent out on the socket. SyntaxReturnsIt returns the default time-to-live value. ThrowIOException - This exception occurs while getting the default time-to-live value. NOTE : this method is Deprecated, instead of this method getTimeToLive method is used as it returns an int instead of a byte.Example 1Test it NowOutput: TTL : 25 Example 2Test it NowOutput: TTL : 30 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