public SMSG_CHANNEL_SELECT(Square square, int sessionid)
            : base(47499)
        {
            this.EnsureCapacity(62);
            String sessionname = Convert.ToString(sessionid);

            m_Stream.Write((int)0x00000000);
            m_Stream.Write((ushort)(square.IPAddr.Length + 1));
            m_Stream.WriteAsciiFixed(square.IPAddr, square.IPAddr.Length + 1);
            m_Stream.Write((ushort)(square.Port));

            //Position is static for now
            m_Stream.Write((ushort)(sessionname.Length + 1));
            m_Stream.WriteAsciiFixed(sessionname, sessionname.Length + 1);
        }
Exemplo n.º 2
0
        public static void ConnectWorld(byte[] packet, SocketClient sockstate)
        {
            CMSG_CONNECT_MASTER cpkt = (CMSG_CONNECT_MASTER)packet;

            string Name = cpkt.Name;
            string IPAddr = cpkt.IPAddr;
            int Port = cpkt.Port;

            Square nSquare = new Square(Name, 1, 0, IPAddr, Port, sockstate);
            Program.SquareList.Add(nSquare);

            Logger.Log(Logger.LogLevel.Access, "Client.World", "World server connected : {0} ", Name);

            sockstate.WServer = true;
            sockstate.WSquare = nSquare;
        }