jdk/src/share/classes/java/net/Socket.java
changeset 18156 edb590d448c5
parent 17469 e00a02431a8b
child 18274 7c4289125569
equal deleted inserted replaced
18155:889970e5b728 18156:edb590d448c5
  1084      *  to a non-zero timeout, a read() call on the InputStream associated with
  1084      *  to a non-zero timeout, a read() call on the InputStream associated with
  1085      *  this Socket will block for only this amount of time.  If the timeout
  1085      *  this Socket will block for only this amount of time.  If the timeout
  1086      *  expires, a <B>java.net.SocketTimeoutException</B> is raised, though the
  1086      *  expires, a <B>java.net.SocketTimeoutException</B> is raised, though the
  1087      *  Socket is still valid. The option <B>must</B> be enabled
  1087      *  Socket is still valid. The option <B>must</B> be enabled
  1088      *  prior to entering the blocking operation to have effect. The
  1088      *  prior to entering the blocking operation to have effect. The
  1089      *  timeout must be > 0.
  1089      *  timeout must be {@code > 0}.
  1090      *  A timeout of zero is interpreted as an infinite timeout.
  1090      *  A timeout of zero is interpreted as an infinite timeout.
  1091      *
  1091      *
  1092      * @param timeout the specified timeout, in milliseconds.
  1092      * @param timeout the specified timeout, in milliseconds.
  1093      * @exception SocketException if there is an error
  1093      * @exception SocketException if there is an error
  1094      * in the underlying protocol, such as a TCP error.
  1094      * in the underlying protocol, such as a TCP error.
  1293      * Sets traffic class or type-of-service octet in the IP
  1293      * Sets traffic class or type-of-service octet in the IP
  1294      * header for packets sent from this Socket.
  1294      * header for packets sent from this Socket.
  1295      * As the underlying network implementation may ignore this
  1295      * As the underlying network implementation may ignore this
  1296      * value applications should consider it a hint.
  1296      * value applications should consider it a hint.
  1297      *
  1297      *
  1298      * <P> The tc <B>must</B> be in the range <code> 0 <= tc <=
  1298      * <P> The tc <B>must</B> be in the range {@code 0 <= tc <=
  1299      * 255</code> or an IllegalArgumentException will be thrown.
  1299      * 255} or an IllegalArgumentException will be thrown.
  1300      * <p>Notes:
  1300      * <p>Notes:
  1301      * <p>For Internet Protocol v4 the value consists of an
  1301      * <p>For Internet Protocol v4 the value consists of an
  1302      * <code>integer</code>, the least significant 8 bits of which
  1302      * <code>integer</code>, the least significant 8 bits of which
  1303      * represent the value of the TOS octet in IP packets sent by
  1303      * represent the value of the TOS octet in IP packets sent by
  1304      * the socket.
  1304      * the socket.