Esempio n. 1
0
        protected virtual void DispatchLoginHashedResponse(FrostbiteConnection sender, Packet cpRecievedPacket, Packet cpRequestPacket) {
            if (cpRequestPacket.Words.Count == 1 && cpRecievedPacket.Words.Count >= 2) {
                sender.SendQueued(new Packet(false, false, sender.AcquireSequenceNumber, new List<string>() {
                    "login.hashed",
                    GeneratePasswordHash(HashToByteArray(cpRecievedPacket.Words[1]), Password)
                }));
            }
            else if (cpRequestPacket.Words.Count >= 2) {
                IsLoggedIn = true;

                if (Login != null) {
                    this.Login(this);
                }
            }
        }
Esempio n. 2
0
        private void m_connection_ConnectionReady(FrostbiteConnection sender) {
            // Sleep the thread so the server has enough time to setup the listener.
            // This is generally only problematic when connecting to local layers.
            Thread.Sleep(50);

            sender.SendQueued(new Packet(false, false, sender.AcquireSequenceNumber, "version"));

        }