DatagramSocket.java (laddr): Removed.
* java/net/DatagramSocket.java (laddr): Removed. (DatagramSocket): Removed attempts to get or set laddr if null. (getLocalAddress): Reimplemented per spec. * java/net/MulticastSocket.java (setTimeToLive): Throw exception when ttl is 0. (joinGroup): Throw NullPointerException if any argument is null. (leaveGroup): ditto. * java/net/PlainDatagramSocketImpl.java: Updated comments. * java/net/PlainSocketImpl.java (timeout): Added. (getInputStream): Added FIXME comment on how to support timeouts for TCP. * java/net/ServerSocket.java (ServerSocket): Added FIXME comment. * java/net/Socket.java: Added FIXME comments to identify conflicting specs between the JCL and JDK 1.2 documents. * java/net/natPlainDatagramSocketImpl.cc (bind): Use INADDR_ANY if host is null. Get localport value resolved by kernel if bind lport is 0. (receive): Implemented support for timeouts in UDP. (setOption): Implemented based on natPlainSocketImpl version. (getOption): ditto. * java/net/natPlainSocketImpl.cc (bind): Get localport value resolved by kernel if bind lport is 0. (connect): Get localport value resolved by kernel if bind wasn't done to set localport. (accept): Implemented support for timeouts for ServerSocket. (setOption): Save value for SO_TIMEOUT. (getOption): Return timeout for SO_TIMEOUT. From-SVN: r27230
This commit is contained in:
parent
930248932e
commit
07515641a5
9 changed files with 332 additions and 59 deletions
|
@ -37,6 +37,9 @@ class PlainSocketImpl extends SocketImpl
|
|||
|
||||
int fnum = -1;
|
||||
|
||||
// This value is set/read by setOption/getOption.
|
||||
int timeout = 0;
|
||||
|
||||
public native void setOption(int optID, Object value) throws SocketException;
|
||||
|
||||
public native Object getOption(int optID) throws SocketException;
|
||||
|
@ -66,6 +69,7 @@ class PlainSocketImpl extends SocketImpl
|
|||
|
||||
protected InputStream getInputStream() throws IOException
|
||||
{
|
||||
// FIXME: TODO - Implement class SocketInputStream timeouts in read();
|
||||
if (in == null)
|
||||
in = new FileInputStream (fd);
|
||||
return in;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue