2002-10-03 Michael Koch <konqueror@gmx.de>
* java/net/DatagramPacket.java (setLength): Fixed typo and be HTML-aware. * java/net/InetSocketAddress.java (InetSocketAddress): Correct initialization of hostname, fixed typo. (equals): Added comment about equality of InetSocketAddress objects. * java/net/ServerSocket.java (accept): Added checks. (isClosed): New stubbed method. * java/net/SocketOptions.java: Reindention. * java/net/SocketPermission (SocketPermission): Documentation fixed. From-SVN: r57776
This commit is contained in:
parent
4c9c9a3da5
commit
a8e8f5c359
6 changed files with 46 additions and 19 deletions
|
@ -287,6 +287,13 @@ public class ServerSocket
|
|||
*/
|
||||
public Socket accept () throws IOException
|
||||
{
|
||||
if (impl == null)
|
||||
throw new IOException ("Cannot initialize Socket implementation");
|
||||
|
||||
SecurityManager sm = System.getSecurityManager ();
|
||||
if (sm != null)
|
||||
sm.checkListen (impl.getLocalPort ());
|
||||
|
||||
Socket s = new Socket();
|
||||
implAccept (s);
|
||||
|
||||
|
@ -358,6 +365,17 @@ public class ServerSocket
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the socket is closed, otherwise false
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public boolean isClosed()
|
||||
{
|
||||
// FIXME: implement this
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of SO_TIMEOUT. A value of 0 implies that SO_TIMEOUT is
|
||||
* disabled (ie, operations never time out). This is the number of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue