Skip to content

Instantly share code, notes, and snippets.

@Cloven
Created December 10, 2012 18:00
Show Gist options
  • Save Cloven/4252172 to your computer and use it in GitHub Desktop.
Save Cloven/4252172 to your computer and use it in GitHub Desktop.
channelinboundworkhandler for netty4a8 example
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