Beispiel #1
0
        protected override void OnClientAccepted(Socket client)
        {
            MapleClient mc = new MapleClient(client, this, m_processor);

            mc.SendRaw(PacketCreator.Handshake());
            MainForm.Instance.Log("[Login] Accepted client {0}", mc.Label);
        }
Beispiel #2
0
        private void OnClientAccepted(Socket socket)
        {
            MapleClient client = new MapleClient(socket, mProcessor, mClients.Remove);

            this.SetClientAttributes(client);

            mClients.Add(client);

            using (OutPacket oPacket = new OutPacket(14, 16))
            {
                oPacket
                .WriteShort(Constants.Version)
                .WriteMapleString(Constants.Patch)
                .WriteBytes(Constants.RIV)
                .WriteBytes(Constants.SIV)
                .WriteByte(Constants.Locale);

                client.SendRaw(oPacket.ToArray());
            }

            Logger.Write(LogLevel.Info, "[{0}] Accepted client from {1}.", mLabel, client.Host);
        }