Package com.martiansoftware.nailgun
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 int
private static final int
private final AtomicInteger
private boolean
private 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 java.net.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:
bind
in classServerSocket
- Throws:
IOException
-
accept
- Overrides:
accept
in classServerSocket
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classServerSocket
- Throws:
IOException
-