public class AFUNIXSocket extends Socket
| Modifier and Type | Field and Description |
|---|---|
protected org.newsclub.net.unix.AFUNIXSocketImpl |
impl |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(SocketAddress bindpoint)
Binds this
AFUNIXSocket to the given bindpoint. |
void |
connect(SocketAddress endpoint) |
void |
connect(SocketAddress endpoint,
int timeout) |
static AFUNIXSocket |
connectTo(AFUNIXSocketAddress addr)
Creates a new
AFUNIXSocket and connects it to the given AFUNIXSocketAddress. |
static boolean |
isSupported()
Returns
true iff AFUNIXSockets are supported by the current Java VM. |
static AFUNIXSocket |
newInstance()
Creates a new, unbound
AFUNIXSocket. |
static AFUNIXSocket |
newStrictInstance()
Creates a new, unbound, "strict"
AFUNIXSocket. |
String |
toString() |
close, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, 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, shutdownInput, shutdownOutputpublic static AFUNIXSocket newInstance() throws IOException
AFUNIXSocket.
This "default" implementation is a bit "lenient" with respect to the specification.
In particular, we ignore calls to Socket.getTcpNoDelay() and
Socket.setTcpNoDelay(boolean).IOExceptionpublic static AFUNIXSocket newStrictInstance() throws IOException
AFUNIXSocket.
This call uses an implementation that tries to be closer to the specification than
newInstance(), at least for some cases.IOExceptionpublic static AFUNIXSocket connectTo(AFUNIXSocketAddress addr) throws IOException
AFUNIXSocket and connects it to the given AFUNIXSocketAddress.addr - The address to connect to.IOExceptionpublic void bind(SocketAddress bindpoint) throws IOException
AFUNIXSocket to the given bindpoint. Only bindpoints of the type
AFUNIXSocketAddress are supported.bind in class SocketIOExceptionpublic void connect(SocketAddress endpoint) throws IOException
connect in class SocketIOExceptionpublic void connect(SocketAddress endpoint, int timeout) throws IOException
connect in class SocketIOExceptionpublic static boolean isSupported()
true iff AFUNIXSockets are supported by the current Java VM.
To support AFUNIXSockets, a custom JNI library must be loaded that is supplied with
junixsocket.true iff supported.Copyright © 2009–2014 Kohlschütter Search Intelligence. All rights reserved.