private static void TransmitNextFrame() { try { byte[] imageData = _screenCapture.Capture(); ProtoClient.SendImageToServer(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight); // Uncomment the following to enable debugging // MiscUtils.SaveRGBArrayToImageFile(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight, AppConstants.DEBUG_IMAGE_FILE_NAME); } catch (Exception ex) { throw new Exception("Error occured during capture: " + ex.Message, ex); } }
private void TransmitNextFrame() { foreach (HyperionClient hyperionClient in _hyperionClients) { try { byte[] imageData = _screenCapture.Capture(); hyperionClient.SendImageData(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight); // Uncomment the following to enable debugging // MiscUtils.SaveRGBArrayToImageFile(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight, AppConstants.DEBUG_IMAGE_FILE_NAME); } catch (Exception ex) { throw new Exception("Error occured while sending image to server: " + ex.Message, ex); } } }