src/java.base/share/classes/java/net/ServerSocket.java
changeset 58692 04946947ca79
parent 58610 94710bb2a5bb
child 59201 b24f4caa1411
equal deleted inserted replaced
58691:eb172a3b1c1c 58692:04946947ca79
   747         }
   747         }
   748     }
   748     }
   749 
   749 
   750     /**
   750     /**
   751      * Enable/disable {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} with the
   751      * Enable/disable {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} with the
   752      * specified timeout, in milliseconds.  With this option set to a non-zero
   752      * specified timeout, in milliseconds.  With this option set to a positive
   753      * timeout, a call to accept() for this ServerSocket
   753      * timeout value, a call to accept() for this ServerSocket
   754      * will block for only this amount of time.  If the timeout expires,
   754      * will block for only this amount of time.  If the timeout expires,
   755      * a <B>java.net.SocketTimeoutException</B> is raised, though the
   755      * a <B>java.net.SocketTimeoutException</B> is raised, though the
   756      * ServerSocket is still valid.  The option <B>must</B> be enabled
   756      * ServerSocket is still valid. A timeout of zero is interpreted as an
   757      * prior to entering the blocking operation to have effect.  The
   757      * infinite timeout.
   758      * timeout must be {@code > 0}.
   758      * The option <B>must</B> be enabled prior to entering the blocking
   759      * A timeout of zero is interpreted as an infinite timeout.
   759      * operation to have effect.
       
   760      *
   760      * @param timeout the specified timeout, in milliseconds
   761      * @param timeout the specified timeout, in milliseconds
   761      * @throws  SocketException if there is an error in the underlying protocol,
   762      * @throws  SocketException if there is an error in the underlying protocol,
   762      *          such as a TCP error
   763      *          such as a TCP error
   763      * @throws  IllegalArgumentException  if {@code timeout} is negative
   764      * @throws  IllegalArgumentException  if {@code timeout} is negative
   764      * @since   1.1
   765      * @since   1.1