public class UnixSocket extends Socket
Constructor and Description |
---|
UnixSocket(UnixSocketChannel chan) |
Modifier and Type | Method and Description |
---|---|
void |
bind(SocketAddress local) |
void |
close() |
void |
connect(SocketAddress addr) |
void |
connect(SocketAddress addr,
Integer timeout) |
SocketChannel |
getChannel() |
Credentials |
getCredentials()
Retrieves the credentials for this UNIX socket.
|
InetAddress |
getInetAddress() |
InputStream |
getInputStream() |
boolean |
getKeepAlive() |
SocketAddress |
getLocalSocketAddress() |
OutputStream |
getOutputStream() |
int |
getReceiveBufferSize() |
SocketAddress |
getRemoteSocketAddress() |
int |
getSendBufferSize() |
int |
getSoTimeout() |
boolean |
isBound() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
isInputShutdown() |
boolean |
isOutputShutdown() |
void |
setKeepAlive(boolean on) |
void |
setReceiveBufferSize(int size) |
void |
setSendBufferSize(int size) |
void |
setSoTimeout(int timeout) |
void |
shutdownInput() |
void |
shutdownOutput() |
connect, getLocalAddress, getLocalPort, getOOBInline, getPort, getReuseAddress, getSoLinger, getTcpNoDelay, getTrafficClass, sendUrgentData, setOOBInline, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setSoLinger, setTcpNoDelay, setTrafficClass, toString
public UnixSocket(UnixSocketChannel chan)
public void bind(SocketAddress local) throws IOException
bind
in class Socket
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Socket
IOException
public void connect(SocketAddress addr) throws IOException
connect
in class Socket
IOException
public void connect(SocketAddress addr, Integer timeout) throws IOException
IOException
public SocketChannel getChannel()
getChannel
in class Socket
public InetAddress getInetAddress()
getInetAddress
in class Socket
public InputStream getInputStream() throws IOException
getInputStream
in class Socket
IOException
public SocketAddress getLocalSocketAddress()
getLocalSocketAddress
in class Socket
public OutputStream getOutputStream() throws IOException
getOutputStream
in class Socket
IOException
public SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress
in class Socket
public boolean isConnected()
isConnected
in class Socket
public boolean isInputShutdown()
isInputShutdown
in class Socket
public boolean isOutputShutdown()
isOutputShutdown
in class Socket
public void shutdownInput() throws IOException
shutdownInput
in class Socket
IOException
public void shutdownOutput() throws IOException
shutdownOutput
in class Socket
IOException
public final Credentials getCredentials() throws SocketException
UnsupportedOperationException
- if the underlying socket library
doesn't support the SO_PEERCRED optionSocketException
- if fetching the socket option failed.public boolean getKeepAlive() throws SocketException
getKeepAlive
in class Socket
SocketException
public int getReceiveBufferSize() throws SocketException
getReceiveBufferSize
in class Socket
SocketException
public int getSendBufferSize() throws SocketException
getSendBufferSize
in class Socket
SocketException
public int getSoTimeout() throws SocketException
getSoTimeout
in class Socket
SocketException
public void setKeepAlive(boolean on) throws SocketException
setKeepAlive
in class Socket
SocketException
public void setReceiveBufferSize(int size) throws SocketException
setReceiveBufferSize
in class Socket
SocketException
public void setSendBufferSize(int size) throws SocketException
setSendBufferSize
in class Socket
SocketException
public void setSoTimeout(int timeout) throws SocketException
setSoTimeout
in class Socket
SocketException
Copyright © 2017. All rights reserved.