public class Socket extends FileDescriptor
Modifier and Type | Field and Description |
---|---|
static int |
UDS_SUN_PATH_SIZE |
Constructor and Description |
---|
Socket(int fd) |
Modifier and Type | Method and Description |
---|---|
int |
accept(byte[] addr) |
void |
bind(java.net.SocketAddress socketAddress) |
boolean |
connect(java.net.SocketAddress socketAddress) |
void |
disconnect() |
boolean |
finishConnect() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoError() |
int |
getSoLinger() |
int |
getTrafficClass() |
static void |
initialize() |
boolean |
isBroadcast() |
boolean |
isInputShutdown() |
boolean |
isKeepAlive() |
boolean |
isOutputShutdown() |
boolean |
isReuseAddress() |
boolean |
isReusePort() |
boolean |
isShutdown() |
boolean |
isTcpNoDelay() |
void |
listen(int backlog) |
java.net.InetSocketAddress |
localAddress() |
static Socket |
newSocketDgram() |
protected static int |
newSocketDgram0() |
static Socket |
newSocketDomain() |
protected static int |
newSocketDomain0() |
static Socket |
newSocketStream() |
protected static int |
newSocketStream0() |
int |
recvFd() |
DatagramSocketAddress |
recvFrom(java.nio.ByteBuffer buf, int pos, int limit) |
DatagramSocketAddress |
recvFromAddress(long memoryAddress, int pos, int limit) |
java.net.InetSocketAddress |
remoteAddress() |
int |
sendFd(int fdToSend) |
int |
sendTo(java.nio.ByteBuffer buf, int pos, int limit, java.net.InetAddress addr, int port) |
int |
sendToAddress(long memoryAddress, int pos, int limit, java.net.InetAddress addr, int port) |
int |
sendToAddresses(long memoryAddress, int length, java.net.InetAddress addr, int port) |
void |
setBroadcast(boolean broadcast) |
void |
setKeepAlive(boolean keepAlive) |
void |
setReceiveBufferSize(int receiveBufferSize) |
void |
setReuseAddress(boolean reuseAddress) |
void |
setReusePort(boolean reusePort) |
void |
setSendBufferSize(int sendBufferSize) |
void |
setSoLinger(int soLinger) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
void |
setTrafficClass(int trafficClass) |
void |
shutdown() |
void |
shutdown(boolean read, boolean write) |
java.lang.String |
toString() |
close, equals, from, from, hashCode, intValue, isOpen, pipe, read, readAddress, write, writeAddress, writev, writevAddresses
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 disconnect() 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
在课程
FileDescriptor
public static Socket newSocketStream()
public static Socket newSocketDgram()
public static Socket newSocketDomain()
public static void initialize()
protected static int newSocketStream0()
protected static int newSocketDgram0()
protected static int newSocketDomain0()
Copyright © 2008–2018 The Netty Project. All rights reserved.