/// <summary> /// Queue a packet for sending. Queued packet are sent as a bytestream. Might not be 1 packet / send ! /// </summary> /// <param name="p"></param> public void SendPacket(object p) { //create a byte array out of the packet and queue it to the sender thread WriteQueue.Add(NetworkPacketTools.StructureToByteArray(p)); }