head 1.1; branch 1.1.1; access ; symbols DEVEL:1.1.1.1 HEAD:1.1.1; locks ; strict; comment @# @; 1.1 date 2001.03.16.18.13.10; author jallali; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.03.16.18.13.10; author jallali; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.net
Class ServerSocket

    java.lang.Object
      |
      +--java.net.ServerSocket

public class ServerSocket
extends Object

Constructor Summary
`ServerSocket(int aport)` Construct a ServerSocket, bound to the nominated port on the default localhost.
`ServerSocket(int aport, int backlog)` Construct a ServerSocket, bound to the nominated port on the default localhost.
`ServerSocket(int aport, int backlog, InetAddress localAddr)` Construct a ServerSocket, bound to the nominated local host/port.

Method Summary
`Socket` | `accept()` Retrieve the first connection request and answer the 'host' socket that will conduct further communications with the requesting 'client' socket.
`void` | `close()` Close this server socket.
`InetAddress` | `getInetAddress()` Answer the local IP address for this server socket.
`int` | `getLocalPort()` Answer the local port for this server socket.
`int` | `getSoTimeout()` Answer the time-out period of this server socket.
`protected void` | `implAccept(Socket aSocket)` Invoke the server socket implementation to accept a connection on the newly created `aSocket`.
`void` | `setSoTimeout(int timeout)` Set the listen time-out period for this server socket.

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServerSocket

    public ServerSocket(int aport)
                 throws IOException

  Construct a ServerSocket, bound to the nominated port on the default localhost. The default number of pending connections may be backlogged.
  Parameters:
    `aport` - the port number to listen for connection requests on
  See Also:
    `Socket`

### ServerSocket

    public ServerSocket(int aport,
                        int backlog)
                 throws IOException

  Construct a ServerSocket, bound to the nominated port on the default localhost. The number of pending connections that may be backlogged is a specified.
  Parameters:
    `aport` - the port number to listen for connection requests on
    `backlog` - the number of pending connection requests, before requests are rejected
  See Also:
    `Socket`

### ServerSocket

    public ServerSocket(int aport,
                        int backlog,
                        InetAddress localAddr)
                 throws IOException

  Construct a ServerSocket, bound to the nominated local host/port. The number of pending connections that may be backlogged is a specified.
  Parameters:
    `aport` - the port number to listen for connection requests on
    `localAddr` - the local machine address to bind on
    `backlog` - the number of pending connection requests, before requests are rejected
  See Also:
    `Socket`

Method Detail

### accept

    public Socket accept()
                  throws IOException

  Retrieve the first connection request and answer the 'host' socket that will conduct further communications with the requesting 'client' socket.
  Returns:
    Socket the 'host' socket
  Throws:
    IOException - if an error occurs while instantiating the 'host' socket

### close

    public void close()
               throws IOException

  Close this server socket. Any attempt to connect to this socket thereafter will fail.

### getInetAddress

    public InetAddress getInetAddress()

  Answer the local IP address for this server socket. This is useful on multihomed hosts.
  Returns:
    InetAddress the local address

### getLocalPort

    public int getLocalPort()

  Answer the local port for this server socket.
  Returns:
    int the local port the server is listening on

### getSoTimeout

    public int getSoTimeout()
                     throws IOException

  Answer the time-out period of this server socket. This is the time the server will wait listening for connections, before exiting.
  Returns:
    int the listening timeout
  Throws:
    SocketException - thrown if option cannot be retrieved

### implAccept

    protected final void implAccept(Socket aSocket)
                             throws IOException

  Invoke the server socket implementation to accept a connection on the newly created `aSocket`.
  Parameters:
    `aSocket` - the concrete socketImpl to accept the connection request on
  Throws:
    IOException - thrown if connection cannot be accepted

### setSoTimeout

    public void setSoTimeout(int timeout)
                      throws SocketException

  Set the listen time-out period for this server socket.
  Parameters:
    `timeout` - the time to wait for a connection request
  Throws:
    SocketException - thrown if an error occurs during setting the option

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

@ 1.1.1.1 log @import initial @ text @@