Java ServerSocket getSoTimeout() MethodThe getSoTimeout() method of ServerSocket class is used to enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. If the timeout expires, a java.net.SocketTimeoutException is raised, though the ServerSocket is still valid. SyntaxReturns:The SO_TIMEOUT value Throws:IOException - if an I/O error occurs Since:1.1 Example 1ServerApplication: ClientApplication: Output: Example 2ServerApplication: ClientApplication:
Next TopicJava ServerSocket
|