Class NGUnixDomainServerSocket
java.lang.Object
java.net.ServerSocket
com.martiansoftware.nailgun.NGUnixDomainServerSocket
- All Implemented Interfaces:
Closeable, AutoCloseable
Implements a
ServerSocket which binds to a local Unix domain socket
and returns instances of NGUnixDomainSocket from
accept().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final intprivate final AtomicIntegerprivate booleanprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an unbound Unix domain server socket.NGUnixDomainServerSocket(int backlog) Constructs an unbound Unix domain server socket with the specified listen backlog.NGUnixDomainServerSocket(int backlog, String path) Constructs and binds a Unix domain server socket to the specified path with the specified listen backlog.Constructs and binds a Unix domain server socket to the specified path. -
Method Summary
Methods inherited from class ServerSocket
bind, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
-
Field Details
-
DEFAULT_BACKLOG
private static final int DEFAULT_BACKLOG- See Also:
-
fd
-
backlog
private final int backlog -
isBound
private boolean isBound -
isClosed
private boolean isClosed
-
-
Constructor Details
-
NGUnixDomainServerSocket
Constructs an unbound Unix domain server socket.- Throws:
IOException
-
NGUnixDomainServerSocket
Constructs an unbound Unix domain server socket with the specified listen backlog.- Throws:
IOException
-
NGUnixDomainServerSocket
Constructs and binds a Unix domain server socket to the specified path.- Throws:
IOException
-
NGUnixDomainServerSocket
Constructs and binds a Unix domain server socket to the specified path with the specified listen backlog.- Throws:
IOException
-
-
Method Details
-
bind
- Overrides:
bindin classServerSocket- Throws:
IOException
-
accept
- Overrides:
acceptin classServerSocket- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classServerSocket- Throws:
IOException
-