public void SendPacket(IPacket packet)
 {
     SendBytes(packet.Lock());
     if (packet.Locked)
         packet.Unlock();
 }