- public class SaslServerSocket
- extends java.net.ServerSocket
This class implements server sockets. A server socket waits for requests to
come in over the network. It performs some operation based on that request,
and then possibly returns a result to the requester.
Creates a server socket on a specified port.
Listens for a connection to be made to this socket and accepts it.
|Methods inherited from class java.net.ServerSocket
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
private static org.apache.log4j.Category cat
public SaslServerSocket(int port)
- Creates a server socket on a specified port. 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.
If there is a security manager, its checkListen() method is
called with the port argument as its argument to ensure the operation is
allowed. This could result in a SecurityException.
public java.net.Socket accept()
- Listens for a connection to be made to this socket and accepts it. The
method blocks until a connection is made.
A new Socket s is created and, if there is a security manager,
the security manager's checkAccept() method is called with
s.getInetAddress().getHostAddress() and s.getPort() as
its arguments to ensure the operation is allowed. This could result in a
NOTE:This implementation now _always_ starts by reading on this
(server) side, which implies that the peer (client) has to start the
dialogue. This is no problem for mechanisms whose client has an initial
response to send to the server. However, for those mechanisms whose
client does not have an initial response, we achieve this in
SaslClientSocketFactory by adding a write of a
0-byte message that we (SHOULD) discard in the mechanism's server