public class UnixDomainSocket extends Socket
| Modifier and Type | Class and Description |
|---|---|
static class |
UnixDomainSocket.SockAddr |
| Modifier and Type | Field and Description |
|---|---|
static int |
AF_UNIX |
static int |
PROTOCOL |
static int |
SOCK_STREAM |
| Constructor and Description |
|---|
UnixDomainSocket(String path) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static int |
close(int fd) |
static int |
connect(int sockfd,
UnixDomainSocket.SockAddr sockaddr,
int addrlen) |
void |
connect(SocketAddress endpoint) |
void |
connect(SocketAddress endpoint,
int timeout) |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
static int |
recv(int fd,
byte[] buffer,
int count,
int flags) |
static int |
send(int fd,
byte[] buffer,
int count,
int flags) |
void |
setKeepAlive(boolean b) |
void |
setReceiveBufferSize(int size) |
void |
setSendBufferSize(int size) |
void |
setSoLinger(boolean b,
int i) |
void |
setSoTimeout(int timeout) |
void |
setTcpNoDelay(boolean b) |
void |
shutdownInput() |
void |
shutdownOutput() |
static int |
socket(int domain,
int type,
int protocol) |
static String |
strerror(int errno) |
bind, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setTrafficClass, toStringpublic static final int AF_UNIX
public static final int SOCK_STREAM
public static final int PROTOCOL
public UnixDomainSocket(String path) throws IOException
IOExceptionpublic static int socket(int domain,
int type,
int protocol)
throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorExceptionpublic static int connect(int sockfd,
UnixDomainSocket.SockAddr sockaddr,
int addrlen)
throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorExceptionpublic static int recv(int fd,
byte[] buffer,
int count,
int flags)
throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorExceptionpublic static int send(int fd,
byte[] buffer,
int count,
int flags)
throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorExceptionpublic static int close(int fd)
throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorExceptionpublic static String strerror(int errno)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose 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 InputStream getInputStream()
getInputStream in class Socketpublic OutputStream getOutputStream()
getOutputStream in class Socketpublic void setTcpNoDelay(boolean b)
setTcpNoDelay in class Socketpublic void setKeepAlive(boolean b)
setKeepAlive in class Socketpublic void setReceiveBufferSize(int size)
setReceiveBufferSize in class Socketpublic void setSendBufferSize(int size)
setSendBufferSize in class Socketpublic void setSoLinger(boolean b,
int i)
setSoLinger in class Socketpublic void setSoTimeout(int timeout)
setSoTimeout in class Socketpublic void shutdownInput()
shutdownInput in class Socketpublic void shutdownOutput()
shutdownOutput in class SocketCopyright © 2016. All rights reserved.