src/java.base/share/classes/java/net/Socket.java
changeset 58692 04946947ca79
parent 58610 94710bb2a5bb
child 59201 b24f4caa1411
equal deleted inserted replaced
58691:eb172a3b1c1c 58692:04946947ca79
  1169     }
  1169     }
  1170 
  1170 
  1171     /**
  1171     /**
  1172      *  Enable/disable {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}
  1172      *  Enable/disable {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT}
  1173      *  with the specified timeout, in milliseconds. With this option set
  1173      *  with the specified timeout, in milliseconds. With this option set
  1174      *  to a non-zero timeout, a read() call on the InputStream associated with
  1174      *  to a positive timeout value, a read() call on the InputStream associated with
  1175      *  this Socket will block for only this amount of time.  If the timeout
  1175      *  this Socket will block for only this amount of time.  If the timeout
  1176      *  expires, a <B>java.net.SocketTimeoutException</B> is raised, though the
  1176      *  expires, a <B>java.net.SocketTimeoutException</B> is raised, though the
  1177      *  Socket is still valid. The option <B>must</B> be enabled
  1177      *  Socket is still valid. A timeout of zero is interpreted as an infinite timeout.
  1178      *  prior to entering the blocking operation to have effect. The
  1178      *  The option <B>must</B> be enabled prior to entering the blocking operation
  1179      *  timeout must be {@code > 0}.
  1179      *  to have effect.
  1180      *  A timeout of zero is interpreted as an infinite timeout.
       
  1181      *
  1180      *
  1182      * @param timeout the specified timeout, in milliseconds.
  1181      * @param timeout the specified timeout, in milliseconds.
  1183      * @throws  SocketException if there is an error in the underlying protocol,
  1182      * @throws  SocketException if there is an error in the underlying protocol,
  1184      *          such as a TCP error
  1183      *          such as a TCP error
  1185      * @throws  IllegalArgumentException if {@code timeout} is negative
  1184      * @throws  IllegalArgumentException if {@code timeout} is negative