Created
June 16, 2014 10:38
-
-
Save daschl/18bb0c18cba5990b4b88 to your computer and use it in GitHub Desktop.
This file contains 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
@Override | |
protected void channelRead0(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { | |
if (msg.getStatus() == BinaryMemcacheResponseStatus.SUCCESS) { | |
while(msg.content().isReadable()) { | |
short supported = msg.content().readShort(); | |
if (supported == 0x01) { | |
SupportedDatatypes dtypes = new SupportedDatatypes(true, true); | |
LOGGER.debug(ctx.channel().remoteAddress() + " Hello detected: " + dtypes); | |
ctx.fireUserEventTriggered(dtypes); | |
} | |
} | |
} else { | |
LOGGER.debug(ctx.channel().remoteAddress() + " Hello not successful (Response Status: " | |
+ msg.getStatus() + "), falling back to " + "no datatype."); | |
} | |
originalPromise.setSuccess(); | |
ctx.pipeline().remove(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment