private void SendHeartbeat() { HeartbeatRequest msg = new HeartbeatRequest(); msg.number = m_heartbeatNumber; m_client.Send(msg.Serialize()); m_heartbeatNumber++; }
public static HeartbeatRequest Parse(byte[] data) { var num = BitConverter.ToInt32(data, 0); HeartbeatRequest msg = new HeartbeatRequest(); msg.number = num; return(msg); }