public class SSLServerSocket
extends java.net.ServerSocket
Constructor and Description |
---|
SSLServerSocket(int port,
int backlog,
java.net.InetAddress bindAddr,
SSLServerContext context)
Create a server with the specified port, listen backlog, local IP address to bind to,
and SSLContext.
|
SSLServerSocket(int port,
int backlog,
SSLServerContext context)
Creates a server socket with a specified SSLContext and binds it to the specified
local port number.
|
SSLServerSocket(int port,
SSLServerContext context)
Creates a server socket on a specified port with a specified SSLContext.
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
accept()
Listens for a connection to be made to this socket and accepts it.
|
SSLServerContext |
getContext()
Get the context of this SSLServerSocket.
|
void |
setContext(SSLServerContext ssl_context)
Set the context of this SSLServerSocket.
|
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
public SSLServerSocket(int port, SSLServerContext context) throws java.io.IOException
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.
port
- the port number, or 0 to use any free portcontext
- the SSLContext for new SSLSocketsjava.io.IOException
public SSLServerSocket(int port, int backlog, SSLServerContext context) throws java.io.IOException
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.
port
- the port number, or 0 to use any free portbacklog
- the maximum length of the queuecontext
- the SSLContext for new SSLSocketsjava.io.IOException
public SSLServerSocket(int port, int backlog, java.net.InetAddress bindAddr, SSLServerContext context) throws java.io.IOException
port
- the port number, or 0 to use any free portbacklog
- the maximum length of the queuebindAddr
- the local InetAddress the server will bind tocontext
- the SSLContext for new SSLSocketsjava.io.IOException
public SSLServerContext getContext()
public void setContext(SSLServerContext ssl_context)
public java.net.Socket accept() throws java.io.IOException
accept
in class java.net.ServerSocket
java.io.IOException