epoll-netty-implementation

gen-tcp-handler

(gen-tcp-handler core stats channel-group handler)

Wraps Netty boilerplate for common TCP server handlers. Given a reference to a core, a stats package, a channel group, and a handler fn, returns a ChannelInboundHandlerAdapter which calls (handler core stats channel-handler-context message) for each received message.

Automatically handles channel closure, and handles exceptions thrown by the handler by logging an error and closing the channel.