}
public ChannelFuture send(Packet packet) {
packetQueue.add(packet);
if (getChannel().attr(WRITE_ONCE).get() == null) {
return getChannel().writeAndFlush(new XHRSendPacketsMessage(getSessionId(), origin, packetQueue));
}
return getChannel().newSucceededFuture();
}