Exemplo n.º 1
0
        public void OnClientAccepted(object sender, SocketEventArgs e)
        {
            Console.WriteLine("[{0}] Accepted connection from {1}.", "Login", e.Socket.RemoteEndPoint.ToString());
            Client Client = new Client(e.Socket, 0, 0, "Login");

            Client.SessionId = Randomizer.NextLong();

            Client.SendHandshake(Constants.MajorVersion, Constants.MinorVersion, Constants.Locale);

            Clients.Add(Client);
        }
Exemplo n.º 2
0
        private void OnClientAccepted(object sender, SocketEventArgs e)
        {
            Console.WriteLine("[{0}] Accepted connection from {1}.", Constants.WorldNames[this.Id] + " Channel " + this.Id, e.Socket.RemoteEndPoint.ToString());
            Client Client = new Client(e.Socket, WorldId, Id, "Channel");

            Client.SendHandshake(Constants.MajorVersion, Constants.MinorVersion, Constants.Locale);

            Clients.Add(Client);
        }