|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjcontrol.net.ServerSocket
public class ServerSocket
JControl - ServerSocket Implementation
| Constructor Summary | |
|---|---|
ServerSocket(int port)
Creates a server socket, bound to the specified port. |
|
| Method Summary | |
|---|---|
Socket |
accept()
Listens for a connection to be made to this socket and accepts it. |
void |
close()
Closes this socket. |
protected void |
finalize()
Free internal data structures used by this serversocket object. |
int |
getLocalPort()
Returns the port on which this socket is listening. |
boolean |
isClosed()
Returns the closed state of the ServerSocket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, notifyAll, toString, wait |
| Constructor Detail |
|---|
public ServerSocket(int port)
throws IOException
port - - the port number, or 0 to use any free port.
IOException - - if an I/O error occurs when opening the socket.| Method Detail |
|---|
public Socket accept()
throws IOException
IOException - if an I/O error occurs when waiting for a connection.
if the socket was closed while waiting for connection
public void close()
throws IOException
IOException - if an I/O error occurs when closing the socket.public boolean isClosed()
public int getLocalPort()
protected void finalize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||