public class Socket extends FileDescriptor
Modifier and Type | Field and Description |
---|---|
private static Errors.NativeConnectException |
CONNECT_REFUSED_EXCEPTION |
private static Errors.NativeIoException |
CONNECTION_RESET_EXCEPTION_SENDMSG |
private static Errors.NativeIoException |
CONNECTION_RESET_SHUTDOWN_EXCEPTION |
private static Errors.NativeConnectException |
FINISH_CONNECT_REFUSED_EXCEPTION |
private static java.nio.channels.ClosedChannelException |
SEND_TO_ADDRESS_CLOSED_CHANNEL_EXCEPTION |
private static Errors.NativeIoException |
SEND_TO_ADDRESS_CONNECTION_RESET_EXCEPTION |
private static java.nio.channels.ClosedChannelException |
SEND_TO_ADDRESSES_CLOSED_CHANNEL_EXCEPTION |
private static java.nio.channels.ClosedChannelException |
SEND_TO_CLOSED_CHANNEL_EXCEPTION |
private static Errors.NativeIoException |
SEND_TO_CONNECTION_RESET_EXCEPTION |
private static java.nio.channels.ClosedChannelException |
SHUTDOWN_CLOSED_CHANNEL_EXCEPTION |
static int |
UDS_SUN_PATH_SIZE |
fd, state
Constructor and Description |
---|
Socket(int fd) |
Modifier and Type | Method and Description |
---|---|
int |
accept(byte[] addr) |
private static int |
accept(int fd,
byte[] addr) |
private static int |
bind(int fd,
byte[] address,
int scopeId,
int port) |
void |
bind(java.net.SocketAddress socketAddress) |
private static int |
bindDomainSocket(int fd,
byte[] path) |
private static int |
connect(int fd,
byte[] address,
int scopeId,
int port) |
boolean |
connect(java.net.SocketAddress socketAddress) |
private static int |
connectDomainSocket(int fd,
byte[] path) |
boolean |
finishConnect() |
private static int |
finishConnect(int fd) |
int |
getReceiveBufferSize() |
private static int |
getReceiveBufferSize(int fd) |
int |
getSendBufferSize() |
private static int |
getSendBufferSize(int fd) |
int |
getSoError() |
private static int |
getSoError(int fd) |
int |
getSoLinger() |
private static int |
getSoLinger(int fd) |
int |
getTrafficClass() |
private static int |
getTrafficClass(int fd) |
boolean |
isBroadcast() |
private static int |
isBroadcast(int fd) |
boolean |
isInputShutdown() |
boolean |
isKeepAlive() |
private static int |
isKeepAlive(int fd) |
boolean |
isOutputShutdown() |
boolean |
isReuseAddress() |
private static int |
isReuseAddress(int fd) |
boolean |
isReusePort() |
private static int |
isReusePort(int fd) |
boolean |
isShutdown() |
boolean |
isTcpNoDelay() |
private static int |
isTcpNoDelay(int fd) |
void |
listen(int backlog) |
private static int |
listen(int fd,
int backlog) |
java.net.InetSocketAddress |
localAddress() |
private static byte[] |
localAddress(int fd) |
static Socket |
newSocketDgram() |
protected static int |
newSocketDgram0() |
private static int |
newSocketDgramFd() |
static Socket |
newSocketDomain() |
protected static int |
newSocketDomain0() |
private static int |
newSocketDomainFd() |
static Socket |
newSocketStream() |
protected static int |
newSocketStream0() |
private static int |
newSocketStreamFd() |
int |
recvFd() |
private static int |
recvFd(int fd) |
DatagramSocketAddress |
recvFrom(java.nio.ByteBuffer buf,
int pos,
int limit) |
private static DatagramSocketAddress |
recvFrom(int fd,
java.nio.ByteBuffer buf,
int pos,
int limit) |
private static DatagramSocketAddress |
recvFromAddress(int fd,
long memoryAddress,
int pos,
int limit) |
DatagramSocketAddress |
recvFromAddress(long memoryAddress,
int pos,
int limit) |
java.net.InetSocketAddress |
remoteAddress() |
private static byte[] |
remoteAddress(int fd) |
int |
sendFd(int fdToSend) |
private static int |
sendFd(int socketFd,
int fd) |
int |
sendTo(java.nio.ByteBuffer buf,
int pos,
int limit,
java.net.InetAddress addr,
int port) |
private static int |
sendTo(int fd,
java.nio.ByteBuffer buf,
int pos,
int limit,
byte[] address,
int scopeId,
int port) |
private static int |
sendToAddress(int fd,
long memoryAddress,
int pos,
int limit,
byte[] address,
int scopeId,
int port) |
int |
sendToAddress(long memoryAddress,
int pos,
int limit,
java.net.InetAddress addr,
int port) |
private static int |
sendToAddresses(int fd,
long memoryAddress,
int length,
byte[] address,
int scopeId,
int port) |
int |
sendToAddresses(long memoryAddress,
int length,
java.net.InetAddress addr,
int port) |
void |
setBroadcast(boolean broadcast) |
private static void |
setBroadcast(int fd,
int broadcast) |
void |
setKeepAlive(boolean keepAlive) |
private static void |
setKeepAlive(int fd,
int keepAlive) |
void |
setReceiveBufferSize(int receiveBufferSize) |
private static void |
setReceiveBufferSize(int fd,
int receiveBufferSize) |
void |
setReuseAddress(boolean reuseAddress) |
private static void |
setReuseAddress(int fd,
int reuseAddress) |
void |
setReusePort(boolean reusePort) |
private static void |
setReusePort(int fd,
int reuseAddress) |
void |
setSendBufferSize(int sendBufferSize) |
private static void |
setSendBufferSize(int fd,
int sendBufferSize) |
void |
setSoLinger(int soLinger) |
private static void |
setSoLinger(int fd,
int soLinger) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
private static void |
setTcpNoDelay(int fd,
int tcpNoDelay) |
void |
setTrafficClass(int trafficClass) |
private static void |
setTrafficClass(int fd,
int trafficClass) |
void |
shutdown() |
void |
shutdown(boolean read,
boolean write) |
private static int |
shutdown(int fd,
boolean read,
boolean write) |
java.lang.String |
toString() |
casState, close, equals, from, from, hashCode, inputShutdown, intValue, isClosed, isInputShutdown, isOpen, isOutputShutdown, outputShutdown, pipe, read, readAddress, write, writeAddress, writev, writevAddresses
private static final java.nio.channels.ClosedChannelException SHUTDOWN_CLOSED_CHANNEL_EXCEPTION
private static final java.nio.channels.ClosedChannelException SEND_TO_CLOSED_CHANNEL_EXCEPTION
private static final java.nio.channels.ClosedChannelException SEND_TO_ADDRESS_CLOSED_CHANNEL_EXCEPTION
private static final java.nio.channels.ClosedChannelException SEND_TO_ADDRESSES_CLOSED_CHANNEL_EXCEPTION
private static final Errors.NativeIoException SEND_TO_CONNECTION_RESET_EXCEPTION
private static final Errors.NativeIoException SEND_TO_ADDRESS_CONNECTION_RESET_EXCEPTION
private static final Errors.NativeIoException CONNECTION_RESET_EXCEPTION_SENDMSG
private static final Errors.NativeIoException CONNECTION_RESET_SHUTDOWN_EXCEPTION
private static final Errors.NativeConnectException FINISH_CONNECT_REFUSED_EXCEPTION
private static final Errors.NativeConnectException CONNECT_REFUSED_EXCEPTION
public static final int UDS_SUN_PATH_SIZE
public final void shutdown() throws java.io.IOException
java.io.IOException
public final void shutdown(boolean read, boolean write) throws java.io.IOException
java.io.IOException
public final boolean isShutdown()
public final boolean isInputShutdown()
public final boolean isOutputShutdown()
public final int sendTo(java.nio.ByteBuffer buf, int pos, int limit, java.net.InetAddress addr, int port) throws java.io.IOException
java.io.IOException
public final int sendToAddress(long memoryAddress, int pos, int limit, java.net.InetAddress addr, int port) throws java.io.IOException
java.io.IOException
public final int sendToAddresses(long memoryAddress, int length, java.net.InetAddress addr, int port) throws java.io.IOException
java.io.IOException
public final DatagramSocketAddress recvFrom(java.nio.ByteBuffer buf, int pos, int limit) throws java.io.IOException
java.io.IOException
public final DatagramSocketAddress recvFromAddress(long memoryAddress, int pos, int limit) throws java.io.IOException
java.io.IOException
public final int recvFd() throws java.io.IOException
java.io.IOException
public final int sendFd(int fdToSend) throws java.io.IOException
java.io.IOException
public final boolean connect(java.net.SocketAddress socketAddress) throws java.io.IOException
java.io.IOException
public final boolean finishConnect() throws java.io.IOException
java.io.IOException
public final void bind(java.net.SocketAddress socketAddress) throws java.io.IOException
java.io.IOException
public final void listen(int backlog) throws java.io.IOException
java.io.IOException
public final int accept(byte[] addr) throws java.io.IOException
java.io.IOException
public final java.net.InetSocketAddress remoteAddress()
public final java.net.InetSocketAddress localAddress()
public final int getReceiveBufferSize() throws java.io.IOException
java.io.IOException
public final int getSendBufferSize() throws java.io.IOException
java.io.IOException
public final boolean isKeepAlive() throws java.io.IOException
java.io.IOException
public final boolean isTcpNoDelay() throws java.io.IOException
java.io.IOException
public final boolean isReuseAddress() throws java.io.IOException
java.io.IOException
public final boolean isReusePort() throws java.io.IOException
java.io.IOException
public final boolean isBroadcast() throws java.io.IOException
java.io.IOException
public final int getSoLinger() throws java.io.IOException
java.io.IOException
public final int getSoError() throws java.io.IOException
java.io.IOException
public final int getTrafficClass() throws java.io.IOException
java.io.IOException
public final void setKeepAlive(boolean keepAlive) throws java.io.IOException
java.io.IOException
public final void setReceiveBufferSize(int receiveBufferSize) throws java.io.IOException
java.io.IOException
public final void setSendBufferSize(int sendBufferSize) throws java.io.IOException
java.io.IOException
public final void setTcpNoDelay(boolean tcpNoDelay) throws java.io.IOException
java.io.IOException
public final void setSoLinger(int soLinger) throws java.io.IOException
java.io.IOException
public final void setReuseAddress(boolean reuseAddress) throws java.io.IOException
java.io.IOException
public final void setReusePort(boolean reusePort) throws java.io.IOException
java.io.IOException
public final void setBroadcast(boolean broadcast) throws java.io.IOException
java.io.IOException
public final void setTrafficClass(int trafficClass) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class FileDescriptor
public static Socket newSocketStream()
public static Socket newSocketDgram()
public static Socket newSocketDomain()
protected static int newSocketStream0()
protected static int newSocketDgram0()
protected static int newSocketDomain0()
private static int shutdown(int fd, boolean read, boolean write)
private static int connect(int fd, byte[] address, int scopeId, int port)
private static int connectDomainSocket(int fd, byte[] path)
private static int finishConnect(int fd)
private static int bind(int fd, byte[] address, int scopeId, int port)
private static int bindDomainSocket(int fd, byte[] path)
private static int listen(int fd, int backlog)
private static int accept(int fd, byte[] addr)
private static byte[] remoteAddress(int fd)
private static byte[] localAddress(int fd)
private static int sendTo(int fd, java.nio.ByteBuffer buf, int pos, int limit, byte[] address, int scopeId, int port)
private static int sendToAddress(int fd, long memoryAddress, int pos, int limit, byte[] address, int scopeId, int port)
private static int sendToAddresses(int fd, long memoryAddress, int length, byte[] address, int scopeId, int port)
private static DatagramSocketAddress recvFrom(int fd, java.nio.ByteBuffer buf, int pos, int limit) throws java.io.IOException
java.io.IOException
private static DatagramSocketAddress recvFromAddress(int fd, long memoryAddress, int pos, int limit) throws java.io.IOException
java.io.IOException
private static int recvFd(int fd)
private static int sendFd(int socketFd, int fd)
private static int newSocketStreamFd()
private static int newSocketDgramFd()
private static int newSocketDomainFd()
private static int isReuseAddress(int fd) throws java.io.IOException
java.io.IOException
private static int isReusePort(int fd) throws java.io.IOException
java.io.IOException
private static int getReceiveBufferSize(int fd) throws java.io.IOException
java.io.IOException
private static int getSendBufferSize(int fd) throws java.io.IOException
java.io.IOException
private static int isKeepAlive(int fd) throws java.io.IOException
java.io.IOException
private static int isTcpNoDelay(int fd) throws java.io.IOException
java.io.IOException
private static int isBroadcast(int fd) throws java.io.IOException
java.io.IOException
private static int getSoLinger(int fd) throws java.io.IOException
java.io.IOException
private static int getSoError(int fd) throws java.io.IOException
java.io.IOException
private static int getTrafficClass(int fd) throws java.io.IOException
java.io.IOException
private static void setReuseAddress(int fd, int reuseAddress) throws java.io.IOException
java.io.IOException
private static void setReusePort(int fd, int reuseAddress) throws java.io.IOException
java.io.IOException
private static void setKeepAlive(int fd, int keepAlive) throws java.io.IOException
java.io.IOException
private static void setReceiveBufferSize(int fd, int receiveBufferSize) throws java.io.IOException
java.io.IOException
private static void setSendBufferSize(int fd, int sendBufferSize) throws java.io.IOException
java.io.IOException
private static void setTcpNoDelay(int fd, int tcpNoDelay) throws java.io.IOException
java.io.IOException
private static void setSoLinger(int fd, int soLinger) throws java.io.IOException
java.io.IOException
private static void setBroadcast(int fd, int broadcast) throws java.io.IOException
java.io.IOException
private static void setTrafficClass(int fd, int trafficClass) throws java.io.IOException
java.io.IOException