equal
deleted
inserted
replaced
1219 */ |
1219 */ |
1220 public synchronized void setSoTimeout(int timeout) throws SocketException { |
1220 public synchronized void setSoTimeout(int timeout) throws SocketException { |
1221 if (isClosed()) |
1221 if (isClosed()) |
1222 throw new SocketException("Socket is closed"); |
1222 throw new SocketException("Socket is closed"); |
1223 if (timeout < 0) |
1223 if (timeout < 0) |
1224 throw new IllegalArgumentException("timeout can't be negative"); |
1224 throw new IllegalArgumentException("timeout < 0"); |
1225 |
1225 |
1226 getImpl().setOption(SocketOptions.SO_TIMEOUT, timeout); |
1226 getImpl().setOption(SocketOptions.SO_TIMEOUT, timeout); |
1227 } |
1227 } |
1228 |
1228 |
1229 /** |
1229 /** |