Пример #1
0
        private void ConnectAsyncCompleted(object sender, SocketAsyncEventArgs e)
        {
            // 6c12b527e6810ff7301d972042ae3614f3d73acc
            // ae9b056807ac8bfa58a3e879b1f1601ff17d1df5
            if (e.SocketError != SocketError.Success)
            {
                throw new SocketException((int)e.SocketError);
            }

            NetworkManager      = new NetworkManagerAsync(e.ConnectSocket, HandleReceivedPacket, HandleReceicedPacketFailed);
            NetworkManager.Seed = new Random().Next();
            QueuePacket(new LoginRequestPacket()
            {
                UserID                       = Avatar.ID,
                UserToken                    = Avatar.Token,
                ClientMajorVersion           = 7,
                ClientContentVersion         = 0,
                ClientMinorVersion           = 156,
                FingerprintHash              = "ae9b056807ac8bfa58a3e879b1f1601ff17d1df5",
                OpenUDID                     = "563a6f060d8624db",
                MacAddress                   = null,
                DeviceModel                  = "GT-I9300",
                LocaleKey                    = 2000000,
                Language                     = "en",
                AdvertisingGUID              = "",
                OSVersion                    = "4.0.4",
                IsAdvertisingTrackingEnabled = false,
                AndroidDeviceID              = "563a6f060d8624db",
                FacebookDistributionID       = "",
                VendorGUID                   = "",
                Seed = NetworkManager.Seed
            });
            KeepAliveManager.Start();
        }
Пример #2
0
        private void ConnectAsyncCompleted(object sender, SocketAsyncEventArgs e)
        {
            if (e.SocketError != SocketError.Success)
            {
                throw new SocketException((int)e.SocketError);
            }

            NetworkManager = new NetworkManagerAsync(e.ConnectSocket);
            NetworkManager.PacketReceived += OnPacketReceived;
            NetworkManager.Seed            = new Random().Next();
            SendPacket(new LoginRequestPacket()
            {
                UserID                       = Avatar.ID,
                UserToken                    = Avatar.Token,
                ClientMajorVersion           = 7,
                ClientContentVersion         = 12,
                ClientMinorVersion           = 200,
                FingerprintHash              = "8771aa1095195c4217bd625d66e120d91e8d15b0",
                OpenUDID                     = "563a6f060d8624db",
                MacAddress                   = null,
                DeviceModel                  = "GT-I9300",
                LocaleKey                    = 2000000,
                Language                     = "en",
                AdvertisingGUID              = "",
                OSVersion                    = "4.0.4",
                IsAdvertisingTrackingEnabled = false,
                AndroidDeviceID              = "563a6f060d8624db",
                FacebookDistributionID       = "",
                VendorGUID                   = "",
                Seed = NetworkManager.Seed
            });
            KeepAliveManager.Start();
        }