Example #1
0
        public void WritePacket(ReliableIM.Network.Protocol.Packet packet)
        {
            //Create a new binary writer to write the packet contents.
            BinaryWriter writer = new BinaryWriter(GetStream());

            //Write the packet using this protocol.
            PROTOCOL.WritePacket(writer, packet);

            //Flush the packet to the network.
            writer.Flush();
        }