GetRawData() private method

private GetRawData ( ) : MemoryStream
return System.IO.MemoryStream
        public void Send(Packet packet)
        {
            if (packet != null && connections.Count > 0)
            {
                foreach (Connector conn in connections.Values)
                {
                    using (MemoryStream stream = packet.GetRawData())
                    {
                        conn.Send(stream);
                    }
                }

            }
        }
 public void Send(Guid connectionID, Packet packet)
 {
     if (packet != null)
     {
         _log.InfoFormat("Ordered to send {0} packet to {1}", packet.PacketType.ToString(), connectionID.ToString());
     }
     if (packet != null && connections != null && connections.ContainsKey(connectionID))
     {
         using (MemoryStream stream = packet.GetRawData())
         {
             connections[connectionID].Send(stream);
         }
     }
 }