All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iaik.security.ssl.SSLServerSocket

java.lang.Object
   |
   +----java.net.ServerSocket
           |
           +----iaik.security.ssl.SSLServerSocket

public class SSLServerSocket
extends ServerSocket
This class implements SSL server sockets. A SSL server socket waits for requests to come in over the network and returns a new SSLSocket. A @see SSLContext can be used to create SSLSockets with a special configuration. If no SSLContext is specified a default context will be created.


Constructor Index

 o SSLServerSocket(int)
Creates a server socket on a specified port.
 o SSLServerSocket(int, int)
Creates a server socket and binds it to the specified local port number.
 o SSLServerSocket(int, int, InetAddress)
Create a server with the specified port, listen backlog, and local IP address to bind to.
 o SSLServerSocket(int, int, InetAddress, SSLContext)
Create a server with the specified port, listen backlog, local IP address to bind to, and SSLContext.
 o SSLServerSocket(int, int, SSLContext)
Creates a server socket with a specified SSLContext and binds it to the specified local port number.
 o SSLServerSocket(int, SSLContext)
Creates a server socket on a specified port with a specified SSLContext.

Method Index

 o accept()
Listens for a connection to be made to this socket and accepts it.

Constructors

 o SSLServerSocket
 public SSLServerSocket(int port) throws IOException
Creates a server socket on a specified port. A port of 0 creates a socket on any free port. A default SSLContext will be used.

The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.

Parameters:
port - the port number, or 0 to use any free port
 o SSLServerSocket
 public SSLServerSocket(int port,
                        SSLContext context) throws IOException
Creates a server socket on a specified port with a specified SSLContext. A port of 0 creates a socket on any free port.

The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.

Parameters:
port - the port number, or 0 to use any free port
context - the SSLContext for new SSLSockets
 o SSLServerSocket
 public SSLServerSocket(int port,
                        int backlog) throws IOException
Creates a server socket and binds it to the specified local port number. A port number of 0 creates a socket on any free port. A default SSLContext will be used.

The maximum queue length for incoming connection indications (a request to connect) is set to the count parameter. If a connection indication arrives when the queue is full, the connection is refused.

Parameters:
port - the port number, or 0 to use any free port
backlog - the maximum length of the queue
 o SSLServerSocket
 public SSLServerSocket(int port,
                        int backlog,
                        SSLContext context) throws IOException
Creates a server socket with a specified SSLContext and binds it to the specified local port number. A port number of 0 creates a socket on any free port.

The maximum queue length for incoming connection indications (a request to connect) is set to the count parameter. If a connection indication arrives when the queue is full, the connection is refused.

Parameters:
port - the port number, or 0 to use any free port
backlog - the maximum length of the queue
context - the SSLContext for new SSLSockets
 o SSLServerSocket
 public SSLServerSocket(int port,
                        int backlog,
                        InetAddress bindAddr) throws IOException
Create a server with the specified port, listen backlog, and local IP address to bind to. The bindAddr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If bindAddr is null, it will default accepting connections on any/all local addresses. The port must be between 0 and 65535, inclusive. A default SSLContext will be used.

Parameters:
port - the port number, or 0 to use any free port
backlog - the maximum length of the queue
bindAddr - the local InetAddress the server will bind to
 o SSLServerSocket
 public SSLServerSocket(int port,
                        int backlog,
                        InetAddress bindAddr,
                        SSLContext context) throws IOException
Create a server with the specified port, listen backlog, local IP address to bind to, and SSLContext. The bindAddr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If bindAddr is null, it will default accepting connections on any/all local addresses. The port must be between 0 and 65535, inclusive.

Parameters:
port - the port number, or 0 to use any free port
backlog - the maximum length of the queue
bindAddr - the local InetAddress the server will bind to
context - the SSLContext for new SSLSockets

Methods

 o accept
 public Socket accept() throws IOException
Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made and returns a SSLSocket initialized with the SSLContext defined in the constructor.

Returns:
a new SSLSocket
Overrides:
accept in class ServerSocket

All Packages  Class Hierarchy  This Package  Previous  Next  Index