示例#1
0
        public void Start()
        {
            OperationCode.Initialize();
            ping = new SpPing();

            Server.Start();
        }
示例#2
0
        public void SendPing()
        {
            if (Connected)
            {
                if (Environment.TickCount >= pingTick)
                {
                    var msg = new SpPing().Build();
                    Send(msg, "SpPing");

                    pingTick = Environment.TickCount + Constants.PingTime;
                }
            }
        }
        public Connection(int index, TcpClient tcpClient, string ipAddress)
        {
            msg  = new ByteBuffer();
            ping = new SpPing();

            Client         = tcpClient;
            Client.NoDelay = false;

            Index     = index;
            Connected = true;
            IpAddress = ipAddress;

            ChangeState();
        }
示例#4
0
        public void Process(byte[] buffer, IConnection connection)
        {
            var msg = new SpPing();

            msg.Send(connection);
        }