if (msg instanceof XHRNewChannelMessage) {
write((XHRNewChannelMessage) msg, null, ctx, out);
}
if (msg instanceof XHRPacketMessage) {
XHRPacketMessage m = (XHRPacketMessage) msg;
write(m, m.getPacket(), ctx, out);
}
if (msg instanceof XHROutMessage) {
sendMessage((XHROutMessage) msg, ctx.channel(), out);
}
if (msg instanceof XHRErrorMessage) {