net.ty.channel

Handy functions to deal with netty channels

active?

(active? channel)

add-to-group

(add-to-group group chan)

Add a channel to a channel group

alloc!

(alloc! chan)

await!

(await! channel)

Wait on a channel

channel

(channel x)

channel-group

(channel-group name)

Create a named channel group

channel?

(channel? x)

ChannelBridge

protocol

members

offer-val

(offer-val this v)

ChannelHolder

protocol

members

get-channel

(get-channel this)

Extract channel from holder

ChannelResource

protocol

members

close!

(close! this)

Request to close resource

deregister!

(deregister! this)

disconnect!

(disconnect! this)

flush!

(flush! this)

Request to flush all pending messages

write!

(write! this msg)

write a payload to resource

write-and-flush!

(write-and-flush! this msg)

write a payload, then flush a resource

close-future

(close-future chan)

Get the close future for a channel

compare-and-set-attr!

(compare-and-set-attr! chan k prev next)

config

(config chan)

get-and-remove-attr!

(get-and-remove-attr! chan k)

get-and-set-attr!

(get-and-set-attr! chan k v)

get-attr

(get-attr chan k)

get-attr-key

(get-attr-key k)

get-attr-value

(get-attr-value chan k)

open?

(open? channel)

pipeline

(pipeline chan)

read!

(read! channel)

Schedule read on a channel, preferably one with setAutoRead set to false

read-channel

(read-channel src bufsize)

Bridge a Netty Channel to a readable channel

remove-attr!

(remove-attr! chan k)

remove-from-group

(remove-from-group group chan)

Remove a channel from a channel group

set-attr!

(set-attr! chan k v)

set-attr-if-absent!

(set-attr-if-absent! chan k v)

set-autoread!

(set-autoread! cfg autoread?)

sync!

(sync! chan)

sync-uninterruptibly!

(sync-uninterruptibly! chan)

Sync a channel, without interruptions

taker-fn

(taker-fn handler val)