aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs21
1 files changed, 17 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs
index 086b2bc7c..2a6fa1aad 100644
--- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs
@@ -59,6 +59,11 @@ namespace Tango.Integration.ExternalBridge
set { _ipAddress = value; RaisePropertyChangedAuto(); }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether transport compression is required by the remote machine.
+ /// </summary>
+ public bool CompressionEnabled { get; set; }
+
private bool _enableApplicationLogs;
/// <summary>
/// Gets or sets a value indicating whether to enable receiving application logs.
@@ -281,10 +286,11 @@ namespace Tango.Integration.ExternalBridge
/// </summary>
/// <param name="serialNumber">The machine serial number.</param>
/// <param name="ipAddress">The machine IP address.</param>
- public ExternalBridgeTcpClient(String serialNumber, String ipAddress)
+ public ExternalBridgeTcpClient(String serialNumber, String ipAddress, bool enableCompression)
{
ComponentName = $"External Bridge TCP Client {_component_counter++}";
SerialNumber = serialNumber;
+ CompressionEnabled = enableCompression;
if (ObservablesStaticCollections.Instance.IsInitialized)
{
@@ -296,21 +302,28 @@ namespace Tango.Integration.ExternalBridge
UseKeepAlive = false;
EnableDiagnostics = true;
- Adapter = new TcpTransportAdapter(IPAddress, SettingsManager.Default.GetOrCreate<IntegrationSettings>().ExternalBridgeServicePort);
+ Adapter = new TcpTransportAdapter(IPAddress, SettingsManager.Default.GetOrCreate<IntegrationSettings>().ExternalBridgeServicePort)
+ {
+ EnableCompression = CompressionEnabled
+ };
}
- public ExternalBridgeTcpClient(Machine machine, String ipAddress)
+ public ExternalBridgeTcpClient(Machine machine, String ipAddress, bool enableCompression)
{
ComponentName = $"External Bridge TCP Client {_component_counter++}";
Machine = machine;
SerialNumber = Machine.SerialNumber;
+ CompressionEnabled = enableCompression;
IPAddress = ipAddress;
KeepAliveTimeout = TimeSpan.FromSeconds(5);
KeepAliveRetries = 2;
UseKeepAlive = false;
EnableDiagnostics = true;
- Adapter = new TcpTransportAdapter(IPAddress, SettingsManager.Default.GetOrCreate<IntegrationSettings>().ExternalBridgeServicePort);
+ Adapter = new TcpTransportAdapter(IPAddress, SettingsManager.Default.GetOrCreate<IntegrationSettings>().ExternalBridgeServicePort)
+ {
+ EnableCompression = CompressionEnabled
+ };
}
/// <summary>