public void SendPacket(Packet pkt) { using (TimedLock.Lock(DcLock)) { if (State != ProtocolState.Disconnected) { _handler.SendPacket(pkt); } } }
public void SendPacket(Packet pkt, PacketPriority priority = PacketPriority.Normal) { using (TimedLock.Lock(DcLock)) { if (State != ProtocolState.Disconnected) { _handler.SendPacket(pkt, priority); } } }