jdk/src/share/classes/java/net/Socket.java
changeset 21334 c60dfce46a77
parent 19069 1d9cb0d080e3
child 22339 e91bfaf4360d
equal deleted inserted replaced
21333:e940100a7176 21334:c60dfce46a77
  1228      * <p>The value of {@link SocketOptions#SO_RCVBUF SO_RCVBUF} is also used
  1228      * <p>The value of {@link SocketOptions#SO_RCVBUF SO_RCVBUF} is also used
  1229      * to set the TCP receive window that is advertized to the remote peer.
  1229      * to set the TCP receive window that is advertized to the remote peer.
  1230      * Generally, the window size can be modified at any time when a socket is
  1230      * Generally, the window size can be modified at any time when a socket is
  1231      * connected. However, if a receive window larger than 64K is required then
  1231      * connected. However, if a receive window larger than 64K is required then
  1232      * this must be requested <B>before</B> the socket is connected to the
  1232      * this must be requested <B>before</B> the socket is connected to the
  1233      * remote peer. There are two cases to be aware of:<p>
  1233      * remote peer. There are two cases to be aware of:
  1234      * <ol>
  1234      * <ol>
  1235      * <li>For sockets accepted from a ServerSocket, this must be done by calling
  1235      * <li>For sockets accepted from a ServerSocket, this must be done by calling
  1236      * {@link ServerSocket#setReceiveBufferSize(int)} before the ServerSocket
  1236      * {@link ServerSocket#setReceiveBufferSize(int)} before the ServerSocket
  1237      * is bound to a local address.<p></li>
  1237      * is bound to a local address.<p></li>
  1238      * <li>For client sockets, setReceiveBufferSize() must be called before
  1238      * <li>For client sockets, setReceiveBufferSize() must be called before
  1239      * connecting the socket to its remote peer.<p></li></ol>
  1239      * connecting the socket to its remote peer.</li></ol>
  1240      * @param size the size to which to set the receive buffer
  1240      * @param size the size to which to set the receive buffer
  1241      * size. This value must be greater than 0.
  1241      * size. This value must be greater than 0.
  1242      *
  1242      *
  1243      * @exception IllegalArgumentException if the value is 0 or is
  1243      * @exception IllegalArgumentException if the value is 0 or is
  1244      * negative.
  1244      * negative.
  1327      * <p>For Internet Protocol v4 the value consists of an
  1327      * <p>For Internet Protocol v4 the value consists of an
  1328      * {@code integer}, the least significant 8 bits of which
  1328      * {@code integer}, the least significant 8 bits of which
  1329      * represent the value of the TOS octet in IP packets sent by
  1329      * represent the value of the TOS octet in IP packets sent by
  1330      * the socket.
  1330      * the socket.
  1331      * RFC 1349 defines the TOS values as follows:
  1331      * RFC 1349 defines the TOS values as follows:
  1332      * <p>
  1332      *
  1333      * <UL>
  1333      * <UL>
  1334      * <LI><CODE>IPTOS_LOWCOST (0x02)</CODE></LI>
  1334      * <LI><CODE>IPTOS_LOWCOST (0x02)</CODE></LI>
  1335      * <LI><CODE>IPTOS_RELIABILITY (0x04)</CODE></LI>
  1335      * <LI><CODE>IPTOS_RELIABILITY (0x04)</CODE></LI>
  1336      * <LI><CODE>IPTOS_THROUGHPUT (0x08)</CODE></LI>
  1336      * <LI><CODE>IPTOS_THROUGHPUT (0x08)</CODE></LI>
  1337      * <LI><CODE>IPTOS_LOWDELAY (0x10)</CODE></LI>
  1337      * <LI><CODE>IPTOS_LOWDELAY (0x10)</CODE></LI>