// Ejecuta periodicamente el envío de heartbeat static private void EnviaHeartbeat(object sender, ElapsedEventArgs e) { var hbBytes = HeartBeatGenerator.GeneraHeartbeat(); // Iniciando Pipe using (_pipeClient = new NamedPipeClientStream(_server, _pipe, PipeDirection.Out)) { _pipeClient.Connect(2000); _pipeClient.Write(hbBytes, 0, hbBytes.Length); _pipeClient.Close(); } }
// Ejecuta periodicamente el envío de heartbeat static private void EnviaHeartbeat(object sender, ElapsedEventArgs e) { var hbBytes = HeartBeatGenerator.GeneraHeartbeat(); _skUdpClient.Send(hbBytes); }