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 interface
private class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final NGWin32NamedPipeLibrary
private final NGWin32NamedPipeSocket.CloseCallback
(package private) static final boolean
private final com.sun.jna.platform.win32.WinNT.HANDLE
private final InputStream
private final OutputStream
private final com.sun.jna.platform.win32.WinNT.HANDLE
private final boolean
private 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:
getInputStream
in classSocket
-
getOutputStream
- Overrides:
getOutputStream
in classSocket
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
-
shutdownInput
- Overrides:
shutdownInput
in classSocket
- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutput
in classSocket
- Throws:
IOException
-