Ejemplo n.º 1
0
        private static Task HandleHeartbeat(MaestroClient client)
        {
            LittleEndianWriter writer = new LittleEndianWriter();

            writer.WriteInt((int)16);
            writer.WriteInt((int)1);
            writer.WriteInt((int)MessageTypeEnum.HEARTBEAT);
            writer.WriteInt((int)0);

            var heatBeatData = writer.Data;

            writer.Dispose();

            logger.Write("Heartbeat sended.");
            client.Stream.Write(heatBeatData, 0, heatBeatData.Length);
            return(Task.CompletedTask);
        }