Example usage for Java java.nio.channels SocketChannel fields, constructors, methods, implement or subclass
The text is from its open source code.
void | close() Closes this channel. |
SelectableChannel | configureBlocking(boolean block) Adjusts this channel's blocking mode. |
boolean | connect(SocketAddress remote) Connects this channel's socket. |
boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. |
boolean | finishConnect() Finishes the process of connecting a socket channel. |
SocketAddress | getLocalAddress() If there is a security manager set, its checkConnect method is called with the local address and -1 as its arguments to see if the operation is allowed. |
SocketAddress | getRemoteAddress() Returns the remote address to which this channel's socket is connected. |
boolean | isBlocking() |
boolean | isConnected() Tells whether or not this channel's network socket is connected. |
boolean | isConnectionPending() Tells whether or not a connection operation is in progress on this channel. |
boolean | isOpen() |
SocketChannel | open() Opens a socket channel. |
SocketChannel | open(SocketAddress remote) Opens a socket channel and connects it to a remote address. |
int | read(ByteBuffer dst) |
long | read(ByteBuffer[] dsts) |
SelectionKey | register(Selector sel, int ops) Registers this channel with the given selector, returning a selection key. |
SelectionKey | register(Selector sel, int ops, Object att) Registers this channel with the given selector, returning a selection key. |
SocketChannel | setOption(SocketOption |
Socket | socket() Retrieves a socket associated with this channel. |
int | validOps() Returns an operation set identifying this channel's supported operations. |
int | write(ByteBuffer src) |
long | write(ByteBuffer[] srcs) |
long | write(ByteBuffer[] srcs, int offset, int length) |