public class JavaDatagramSocket extends SelectableJavaSocket
MSG_DONTROUTE, MSG_DONTWAIT, MSG_MORE, MSG_OOB, MSG_PEEK, MSG_WAITALL, SOL_IP, SOL_IPV6, SOL_SOCKET, SOL_TCP, SOL_UDP| Modifier and Type | Method and Description |
|---|---|
one.nio.net.JavaSocket |
accept() |
void |
bind(InetAddress address,
int port,
int backlog) |
void |
close() |
void |
connect(InetAddress address,
int port) |
InetSocketAddress |
getLocalAddress() |
byte[] |
getOption(int level,
int option) |
InetSocketAddress |
getRemoteAddress() |
SelectableChannel |
getSelectableChannel() |
SslContext |
getSslContext() |
boolean |
isOpen() |
void |
listen(int backlog) |
int |
read(byte[] data,
int offset,
int count) |
void |
readFully(byte[] data,
int offset,
int count) |
int |
readRaw(long buf,
int count,
int flags) |
InetSocketAddress |
recv(ByteBuffer buffer,
int flags) |
int |
send(ByteBuffer data,
int flags,
InetAddress address,
int port) |
long |
sendFile(RandomAccessFile file,
long offset,
long count) |
void |
setBlocking(boolean blocking) |
void |
setDeferAccept(boolean deferAccept) |
void |
setKeepAlive(boolean keepAlive) |
void |
setNoDelay(boolean noDelay) |
boolean |
setOption(int level,
int option,
byte[] value) |
void |
setRecvBuffer(int recvBuf) |
void |
setReuseAddr(boolean reuseAddr,
boolean reusePort) |
void |
setSendBuffer(int sendBuf) |
void |
setTcpFastOpen(boolean tcpFastOpen) |
void |
setTimeout(int timeout) |
void |
setTos(int tos) |
Socket |
ssl(SslContext context) |
int |
write(byte[] data,
int offset,
int count,
int flags) |
void |
writeFully(byte[] data,
int offset,
int count) |
int |
writeRaw(long buf,
int count,
int flags) |
bind, bindInet, bindUnix, connect, connectInet, connectUnix, create, createDatagramSocket, createServerSocket, fromFDpublic final void close()
public final one.nio.net.JavaSocket accept()
throws IOException
accept in class SocketIOExceptionpublic final void connect(InetAddress address, int port) throws IOException
connect in class SocketIOExceptionpublic final void bind(InetAddress address, int port, int backlog) throws IOException
bind in class SocketIOExceptionpublic final void listen(int backlog)
throws IOException
listen in class SocketIOExceptionpublic final int writeRaw(long buf,
int count,
int flags)
throws IOException
writeRaw in class SocketIOExceptionpublic final int write(byte[] data,
int offset,
int count,
int flags)
throws IOException
write in class SocketIOExceptionpublic final void writeFully(byte[] data,
int offset,
int count)
throws IOException
writeFully in class SocketIOExceptionpublic int send(ByteBuffer data, int flags, InetAddress address, int port) throws IOException
send in class SocketIOExceptionpublic final int readRaw(long buf,
int count,
int flags)
throws IOException
readRaw in class SocketIOExceptionpublic final int read(byte[] data,
int offset,
int count)
throws IOException
read in class SocketIOExceptionpublic InetSocketAddress recv(ByteBuffer buffer, int flags) throws IOException
recv in class SocketIOExceptionpublic final void readFully(byte[] data,
int offset,
int count)
throws IOException
readFully in class SocketIOExceptionpublic final long sendFile(RandomAccessFile file, long offset, long count) throws IOException
sendFile in class SocketIOExceptionpublic final void setBlocking(boolean blocking)
setBlocking in class Socketpublic final void setTimeout(int timeout)
setTimeout in class Socketpublic final void setKeepAlive(boolean keepAlive)
setKeepAlive in class Socketpublic final void setNoDelay(boolean noDelay)
setNoDelay in class Socketpublic final void setTcpFastOpen(boolean tcpFastOpen)
setTcpFastOpen in class Socketpublic final void setDeferAccept(boolean deferAccept)
setDeferAccept in class Socketpublic final void setReuseAddr(boolean reuseAddr,
boolean reusePort)
setReuseAddr in class Socketpublic final void setRecvBuffer(int recvBuf)
setRecvBuffer in class Socketpublic final void setSendBuffer(int sendBuf)
setSendBuffer in class Socketpublic final byte[] getOption(int level,
int option)
public final boolean setOption(int level,
int option,
byte[] value)
public final InetSocketAddress getLocalAddress()
getLocalAddress in class Socketpublic final InetSocketAddress getRemoteAddress()
getRemoteAddress in class Socketpublic Socket ssl(SslContext context)
public SslContext getSslContext()
getSslContext in class Socketpublic SelectableChannel getSelectableChannel()
getSelectableChannel in class SelectableJavaSocketCopyright © 2018. All rights reserved.