public class UnixSocket
extends java.net.Socket
| Constructor and Description |
|---|
UnixSocket(UnixSocketChannel chan) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(java.net.SocketAddress local) |
void |
close() |
void |
connect(java.net.SocketAddress addr) |
void |
connect(java.net.SocketAddress addr,
int timeout) |
java.nio.channels.SocketChannel |
getChannel() |
Credentials |
getCredentials()
Retrieves the credentials for this UNIX socket.
|
java.net.InetAddress |
getInetAddress() |
java.io.InputStream |
getInputStream() |
boolean |
getKeepAlive() |
java.net.SocketAddress |
getLocalSocketAddress() |
java.io.OutputStream |
getOutputStream() |
int |
getReceiveBufferSize() |
java.net.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() |
getLocalAddress, getLocalPort, getOOBInline, getPort, getReuseAddress, getSoLinger, getTcpNoDelay, getTrafficClass, sendUrgentData, setOOBInline, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setSoLinger, setTcpNoDelay, setTrafficClass, toStringpublic UnixSocket(UnixSocketChannel chan)
public void bind(java.net.SocketAddress local)
throws java.io.IOException
bind in class java.net.Socketjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.net.Socketjava.io.IOExceptionpublic void connect(java.net.SocketAddress addr)
throws java.io.IOException
connect in class java.net.Socketjava.io.IOExceptionpublic void connect(java.net.SocketAddress addr,
int timeout)
throws java.io.IOException
connect in class java.net.Socketjava.io.IOExceptionpublic java.nio.channels.SocketChannel getChannel()
getChannel in class java.net.Socketpublic java.net.InetAddress getInetAddress()
getInetAddress in class java.net.Socketpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.Socketjava.io.IOExceptionpublic java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class java.net.Socketpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class java.net.Socketjava.io.IOExceptionpublic java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class java.net.Socketpublic boolean isBound()
isBound in class java.net.Socketpublic boolean isClosed()
isClosed in class java.net.Socketpublic boolean isConnected()
isConnected in class java.net.Socketpublic boolean isInputShutdown()
isInputShutdown in class java.net.Socketpublic boolean isOutputShutdown()
isOutputShutdown in class java.net.Socketpublic void shutdownInput()
throws java.io.IOException
shutdownInput in class java.net.Socketjava.io.IOExceptionpublic void shutdownOutput()
throws java.io.IOException
shutdownOutput in class java.net.Socketjava.io.IOExceptionpublic final Credentials getCredentials() throws java.net.SocketException
java.lang.UnsupportedOperationException - if the underlying socket library
doesn't support the SO_PEERCRED optionjava.net.SocketException - if fetching the socket option failed.public boolean getKeepAlive()
throws java.net.SocketException
getKeepAlive in class java.net.Socketjava.net.SocketExceptionpublic int getReceiveBufferSize()
throws java.net.SocketException
getReceiveBufferSize in class java.net.Socketjava.net.SocketExceptionpublic int getSendBufferSize()
throws java.net.SocketException
getSendBufferSize in class java.net.Socketjava.net.SocketExceptionpublic int getSoTimeout()
throws java.net.SocketException
getSoTimeout in class java.net.Socketjava.net.SocketExceptionpublic void setKeepAlive(boolean on)
throws java.net.SocketException
setKeepAlive in class java.net.Socketjava.net.SocketExceptionpublic void setReceiveBufferSize(int size)
throws java.net.SocketException
setReceiveBufferSize in class java.net.Socketjava.net.SocketExceptionpublic void setSendBufferSize(int size)
throws java.net.SocketException
setSendBufferSize in class java.net.Socketjava.net.SocketExceptionpublic void setSoTimeout(int timeout)
throws java.net.SocketException
setSoTimeout in class java.net.Socketjava.net.SocketExceptionCopyright © 2021. All Rights Reserved.