private void sendresult(AuthenticationResult result) throws IOException
{
if (AuthenticationResult.SUCCESS == result)
{
PacketUserauthSuccess pus = new PacketUserauthSuccess();
state.tm.sendAsynchronousMessage(pus.getPayload());
state.tm.removeMessageHandler(this, 0, 255);
state.tm.registerMessageHandler(this, 50, 79);
state.cm = new ChannelManager(state);