Liking cljdoc? Tell your friends :D

easy-nio.protocols


DatagramIOcljprotocol

Connectionless datagram send/receive. Implemented by DatagramChannel.

Connectionless datagram send/receive.
Implemented by DatagramChannel.

receive!clj

(receive! ch buf)

Receives a datagram into buf. Returns the source SocketAddress, or nil if no datagram was available (non-blocking mode with empty receive queue).

Receives a datagram into `buf`.
Returns the source SocketAddress, or nil if no datagram was available
(non-blocking mode with empty receive queue).

send!clj

(send! ch buf addr)

Sends the bytes remaining in buf to addr (a SocketAddress). Returns the number of bytes sent.

Sends the bytes remaining in `buf` to `addr` (a SocketAddress).
Returns the number of bytes sent.
sourceraw docstring

NIOChannelcljprotocol

Common operations across all channel types.

Common operations across all channel types.

close!clj

(close! ch)

Closes the channel. Idempotent — safe to call on an already-closed channel.

Closes the channel. Idempotent — safe to call on an already-closed channel.

open?clj

(open? ch)

Returns true if the channel is open.

Returns true if the channel is open.
sourceraw docstring

StreamReadablecljprotocol

Stream-oriented reading into a ByteBuffer. Implemented by SocketChannel. Returns the number of bytes read, or -1 on end-of-stream.

Stream-oriented reading into a ByteBuffer.
Implemented by SocketChannel.
Returns the number of bytes read, or -1 on end-of-stream.

read!clj

(read! ch buf)

Reads bytes from ch into buf. Returns bytes read, or -1 on EOF.

Reads bytes from `ch` into `buf`. Returns bytes read, or -1 on EOF.
sourceraw docstring

StreamWritablecljprotocol

Stream-oriented writing from a ByteBuffer. Implemented by SocketChannel. Returns the number of bytes written.

Stream-oriented writing from a ByteBuffer.
Implemented by SocketChannel.
Returns the number of bytes written.

write!clj

(write! ch buf)

Writes bytes from buf to ch. Returns bytes written.

Writes bytes from `buf` to `ch`. Returns bytes written.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close