Package com.martiansoftware.nailgun
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 class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReferenceCountedFileDescriptor
private final InputStream
private final OutputStream
-
Constructor Summary
ConstructorsConstructorDescriptionNGUnixDomainSocket
(int fd) Creates a Unix domain socket backed by a native file descriptor. -
Method Summary
Methods inherited from class java.net.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:
getInputStream
in classSocket
-
getOutputStream
- Overrides:
getOutputStream
in classSocket
-
shutdownInput
- Overrides:
shutdownInput
in classSocket
- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutput
in classSocket
- Throws:
IOException
-
doShutdown
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
-