net.ty.channel
Handy functions to deal with netty channels
add-to-group
(add-to-group group chan)
Add a channel to a channel group
channel-group
(channel-group name)
Create a named channel group
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)
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)
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-uninterruptibly!
(sync-uninterruptibly! chan)
Sync a channel, without interruptions
taker-fn
(taker-fn handler val)