private void HandleSMSG_PING(SSEventArgs ea) { ping_template data = new ping_template(ea.EventTime.ToString(), true); // send TRUE!!! PingPacket pck = new PingPacket(data); client.SendCommand(client.ServerIp, OpcoDes.CMSG_PONG, pck.GetType().FullName, pck); }
public void PingTimerCallback(ClientManager cm) { try { cm.IsPinged = false; SSocket sSocket = cm.SSocket; if (!sSocket.Connected) return; ping_template data = new ping_template(DateTime.Now.ToString(), cm.IsPinged); PingPacket pck = new PingPacket(data); SendCommand(cm, OpcoDes.SMSG_PING, pck); s_log.Trace("SMSG_PING: {0} ", data.ToString(cm.IPEndPoint.ToString())); } catch (Exception exc) { LogUtil.ErrorException(exc, false, "m_PingTimerCallback"); } }