public void Start() { OperationCode.Initialize(); ping = new SpPing(); Server.Start(); }
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(); }
public void Process(byte[] buffer, IConnection connection) { var msg = new SpPing(); msg.Send(connection); }