Package com.martiansoftware.nailgun
Class NGWin32NamedPipeSocket
java.lang.Object
java.net.Socket
com.martiansoftware.nailgun.NGWin32NamedPipeSocket
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfaceprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final NGWin32NamedPipeLibraryprivate final NGWin32NamedPipeSocket.CloseCallback(package private) static final booleanprivate final com.sun.jna.platform.win32.WinNT.HANDLEprivate final InputStreamprivate final OutputStreamprivate final com.sun.jna.platform.win32.WinNT.HANDLEprivate final booleanprivate final com.sun.jna.platform.win32.WinNT.HANDLE -
Constructor Summary
ConstructorsConstructorDescriptionNGWin32NamedPipeSocket(com.sun.jna.platform.win32.WinNT.HANDLE handle, NGWin32NamedPipeSocket.CloseCallback closeCallback) NGWin32NamedPipeSocket(com.sun.jna.platform.win32.WinNT.HANDLE handle, NGWin32NamedPipeSocket.CloseCallback closeCallback, boolean requireStrictLength) The doc for InputStream#read(byte[] b, int off, int len) states that "An attempt is made to read as many as len bytes, but a smaller number may be read." However, using requireStrictLength, NGWin32NamedPipeSocketInputStream can require that len matches up exactly the number of bytes to read. -
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
-
API
-
DEFAULT_REQUIRE_STRICT_LENGTH
static final boolean DEFAULT_REQUIRE_STRICT_LENGTH- See Also:
-
handle
private final com.sun.jna.platform.win32.WinNT.HANDLE handle -
closeCallback
-
requireStrictLength
private final boolean requireStrictLength -
is
-
os
-
readerWaitable
private final com.sun.jna.platform.win32.WinNT.HANDLE readerWaitable -
writerWaitable
private final com.sun.jna.platform.win32.WinNT.HANDLE writerWaitable
-
-
Constructor Details
-
NGWin32NamedPipeSocket
public NGWin32NamedPipeSocket(com.sun.jna.platform.win32.WinNT.HANDLE handle, NGWin32NamedPipeSocket.CloseCallback closeCallback, boolean requireStrictLength) throws IOException The doc for InputStream#read(byte[] b, int off, int len) states that "An attempt is made to read as many as len bytes, but a smaller number may be read." However, using requireStrictLength, NGWin32NamedPipeSocketInputStream can require that len matches up exactly the number of bytes to read.- Throws:
IOException
-
NGWin32NamedPipeSocket
public NGWin32NamedPipeSocket(com.sun.jna.platform.win32.WinNT.HANDLE handle, NGWin32NamedPipeSocket.CloseCallback closeCallback) throws IOException - Throws:
IOException
-
-
Method Details
-
getInputStream
- Overrides:
getInputStreamin classSocket
-
getOutputStream
- Overrides:
getOutputStreamin classSocket
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-
shutdownInput
- Overrides:
shutdownInputin classSocket- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutputin classSocket- Throws:
IOException
-