Class NGUnixDomainSocket
java.lang.Object
java.net.Socket
com.martiansoftware.nailgun.NGUnixDomainSocket
- All Implemented Interfaces:
Closeable, AutoCloseable
Implements a
Socket backed by a native Unix domain socket.
Instances of this class always return null for
Socket.getInetAddress(), Socket.getLocalAddress(),
Socket.getLocalSocketAddress(), Socket.getRemoteSocketAddress().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReferenceCountedFileDescriptorprivate final InputStreamprivate final OutputStream -
Constructor Summary
ConstructorsConstructorDescriptionNGUnixDomainSocket(int fd) Creates a Unix domain socket backed by a native file descriptor. -
Method Summary
Methods inherited from class Socket
bind, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, toString
-
Field Details
-
fd
-
is
-
os
-
-
Constructor Details
-
NGUnixDomainSocket
public NGUnixDomainSocket(int fd) Creates a Unix domain socket backed by a native file descriptor.
-
-
Method Details
-
getInputStream
- Overrides:
getInputStreamin classSocket
-
getOutputStream
- Overrides:
getOutputStreamin classSocket
-
shutdownInput
- Overrides:
shutdownInputin classSocket- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutputin classSocket- Throws:
IOException
-
doShutdown
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-