private void QueueLoginServerResponse(Queue <byte[]> queueList)
        {
            var encoding = Encoding.UTF8;

            using (var stream = new MemoryStream())
            {
                using (var output = new SwgOutputStream(stream))
                {
                    output.WriteShort((short)SoeOpCodes.SoeChlDataA);
                    output.WriteShort(0);
                    output.WriteShort((short)SoeOpCodes.WorldUpdate);
                    output.WriteInt(Constants.Constants.LoginServer.LoginServerString);
                    output.WriteUtf(Constants.Constants.LoginServer.LoginServerInfo);
                    stream.Position = 0;
                    queueList.Enqueue(stream.ToArray());
                }
            }

            using (var stream = new MemoryStream())
            {
                using (var output = new SwgOutputStream(stream))
                {
                    output.SetOpCode((short)SoeOpCodes.SoeChlDataA);
                    output.SetSequence(0);
                    output.WriteShort((short)SoeOpCodes.WorldUpdate);
                    output.WriteInt(Constants.Constants.LoginServer.LoginServerID);
                    output.WriteInt(29411);
                    stream.Position = 0;
                    queueList.Enqueue(stream.ToArray());
                }
            }
        }
 private void GenerateAck(short sequence)
 {
     using (var stream = new MemoryStream())
     {
         using (var output = new SwgOutputStream(stream))
         {
             output.WriteShort((short)SoeOpCodes.SoeChlDataA);
             output.WriteByte(0);
             output.WriteShort(0);
             output.GenerateCrCSeed(stream.ToArray(), 0);
             _systemMessage.SendMessage(stream.ToArray());
         }
     }
 }
 private static byte[] GenerateNetStatusRequest()
 {
     using (var memoryStream = new MemoryStream())
         using (var outputStream = new SwgOutputStream(memoryStream))
         {
             outputStream.WriteShort((short)SoeOpCodes.SoeNetStatusRes);
             outputStream.ReverseBytes(0); // Client Tick (TODO: Implement client tick)
             outputStream.ReverseBytes(0); // Tick Count (TODO: Implement tick count)
             outputStream.ReverseBytes(0); // ClientPacketsSent (TODO: Implement tick count)
             outputStream.ReverseBytes(0); // ClientPacketsReceived (TODO: Implement tick count)
             outputStream.ReverseBytes(0); // ClientPacketsReceived (TODO: Implement tick count)
             outputStream.ReverseBytes(0); // serverPacketsReceivedThisClient (TODO: Implement)
             return(memoryStream.ToArray());
         }
 }