use of sonoyuncu.impl.event.ThePacket in project SonOyuncuClient by cppool.
the class NetworkManager method sendPacket.
public void sendPacket(Packet packetIn) {
final ThePacket eventPacket = new ThePacket(packetIn, false);
if (eventPacket.cancelled)
return;
if (this.isChannelOpen()) {
this.flushOutboundQueue();
this.dispatchPacket(eventPacket.packet, (GenericFutureListener<? extends Future<? super Void>>[]) null);
} else {
this.readWriteLock.writeLock().lock();
try {
this.outboundPacketsQueue.add(new NetworkManager.InboundHandlerTuplePacketListener(packetIn, (GenericFutureListener[]) null));
} finally {
this.readWriteLock.writeLock().unlock();
}
}
}
Aggregations