Created
December 10, 2012 18:00
-
-
Save Cloven/4252172 to your computer and use it in GitHub Desktop.
channelinboundworkhandler for netty4a8 example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChannelInboundWorkHandler < ChannelInboundHandlerAdapter | |
def newInboundBuffer(ctx) | |
return Unpooled.messageBuffer(512) | |
end | |
def freeInboundBuffer(ctx, channelbuffer) | |
# netty handles this | |
end | |
def inboundBufferUpdated(ctx) | |
puts ctx.inbound_message_buffer.remove_first | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment