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(SocketAddress socketAddress) |
boolean |
connect(SocketAddress socketAddress) |
boolean |
finishConnect() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoError() |
int |
getSoLinger() |
int |
getTrafficClass() |
boolean |
isBroadcast() |
boolean |
isInputShutdown() |
boolean |
isKeepAlive() |
boolean |
isOutputShutdown() |
boolean |
isReuseAddress() |
boolean |
isReusePort() |
boolean |
isShutdown() |
boolean |
isTcpNoDelay() |
void |
listen(int backlog) |
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(ByteBuffer buf,
int pos,
int limit) |
DatagramSocketAddress |
recvFromAddress(long memoryAddress,
int pos,
int limit) |
InetSocketAddress |
remoteAddress() |
int |
sendFd(int fdToSend) |
int |
sendTo(ByteBuffer buf,
int pos,
int limit,
InetAddress addr,
int port) |
int |
sendToAddress(long memoryAddress,
int pos,
int limit,
InetAddress addr,
int port) |
int |
sendToAddresses(long memoryAddress,
int length,
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) |
String |
toString() |
close, equals, from, from, hashCode, intValue, isOpen, pipe, read, readAddress, write, writeAddress, writev, writevAddresses
public final void shutdown() throws IOException
IOException
public final void shutdown(boolean read, boolean write) throws IOException
IOException
public final boolean isShutdown()
public final boolean isInputShutdown()
public final boolean isOutputShutdown()
public final int sendTo(ByteBuffer buf, int pos, int limit, InetAddress addr, int port) throws IOException
IOException
public final int sendToAddress(long memoryAddress, int pos, int limit, InetAddress addr, int port) throws IOException
IOException
public final int sendToAddresses(long memoryAddress, int length, InetAddress addr, int port) throws IOException
IOException
public final DatagramSocketAddress recvFrom(ByteBuffer buf, int pos, int limit) throws IOException
IOException
public final DatagramSocketAddress recvFromAddress(long memoryAddress, int pos, int limit) throws IOException
IOException
public final int recvFd() throws IOException
IOException
public final int sendFd(int fdToSend) throws IOException
IOException
public final boolean connect(SocketAddress socketAddress) throws IOException
IOException
public final boolean finishConnect() throws IOException
IOException
public final void bind(SocketAddress socketAddress) throws IOException
IOException
public final void listen(int backlog) throws IOException
IOException
public final int accept(byte[] addr) throws IOException
IOException
public final InetSocketAddress remoteAddress()
public final InetSocketAddress localAddress()
public final int getReceiveBufferSize() throws IOException
IOException
public final int getSendBufferSize() throws IOException
IOException
public final boolean isKeepAlive() throws IOException
IOException
public final boolean isTcpNoDelay() throws IOException
IOException
public final boolean isReuseAddress() throws IOException
IOException
public final boolean isReusePort() throws IOException
IOException
public final boolean isBroadcast() throws IOException
IOException
public final int getSoLinger() throws IOException
IOException
public final int getSoError() throws IOException
IOException
public final int getTrafficClass() throws IOException
IOException
public final void setKeepAlive(boolean keepAlive) throws IOException
IOException
public final void setReceiveBufferSize(int receiveBufferSize) throws IOException
IOException
public final void setSendBufferSize(int sendBufferSize) throws IOException
IOException
public final void setTcpNoDelay(boolean tcpNoDelay) throws IOException
IOException
public final void setSoLinger(int soLinger) throws IOException
IOException
public final void setReuseAddress(boolean reuseAddress) throws IOException
IOException
public final void setReusePort(boolean reusePort) throws IOException
IOException
public final void setBroadcast(boolean broadcast) throws IOException
IOException
public final void setTrafficClass(int trafficClass) throws IOException
IOException
public 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()
Copyright © 2008–2017 The Netty Project. All rights reserved.