aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-10-29 15:55:21 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-10-29 15:55:21 +0200
commit4b789f33eadfc5cc1d937a80ce03ea8425955ffe (patch)
tree7dbbd0529a24f9ca064cab688a0d6d2b8b762ea1 /Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem
parent8f3baa0d9097aa6ed800863a4680608e867c809a (diff)
parent11fb700fcbc4627162a9c3f84b03b5016248bd97 (diff)
downloadTango-4b789f33eadfc5cc1d937a80ce03ea8425955ffe.tar.gz
Tango-4b789f33eadfc5cc1d937a80ce03ea8425955ffe.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs
index 86506abcf..8272ea34d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs
@@ -15,6 +15,7 @@ using Tango.Integration.Operation;
using Tango.Logging;
using Tango.PPC.Common.ExternalBridge;
using Tango.PPC.Shared.Logs;
+using Tango.Settings;
using Tango.Transport;
using Tango.Transport.Transporters;
using Tango.WebRTC;
@@ -33,6 +34,7 @@ namespace Tango.PPC.Common.FileSystem
private FileSystemManager _manager;
private Dictionary<String, FileSystemOperation> _operations;
private Dictionary<ExternalBridgeReceiver, BasicTransporter> _webRtcClients;
+ private PPCSettings _settings;
public bool Enabled { get; set; } = true;
public bool EnableWebRTC { get; set; } = true;
@@ -43,6 +45,7 @@ namespace Tango.PPC.Common.FileSystem
_manager = new FileSystemManager();
_operations = new Dictionary<string, FileSystemOperation>();
externalBridge.RegisterRequestHandler(this);
+ _settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
}
[ExternalBridgeRequestHandlerMethod(typeof(InitWebRtcRequest), RequestHandlerLoggingMode.LogRequestNameAndContent)]
@@ -66,14 +69,17 @@ namespace Tango.PPC.Common.FileSystem
}
LogManager.Log("Initializing WebRTC transport adapter on 'Passive' mode.");
- var webRtcAdapter = new WebRtcTransportAdapter(receiver, WebRtcTransportAdapterMode.Passive, request.DataChannelName);
+ var webRtcAdapter = new WebRtcTransportAdapter(receiver, WebRtcTransportAdapterMode.Passive, request.DataChannelName)
+ {
+ EnableCompression = receiver.Adapter.EnableCompression
+ };
webRtcAdapter.Ready += (x, e) =>
{
LogManager.Log("The file system service WebRTC channel is ready.");
};
BasicTransporter webRtcTransporter = new BasicTransporter(webRtcAdapter);
- webRtcTransporter = new BasicTransporter(webRtcAdapter);
+ webRtcTransporter.GenericProtocol = receiver.GenericProtocol;
webRtcTransporter.ComponentName = "File System Passive WebRTC Transporter";
webRtcTransporter.UseKeepAlive = false;
webRtcTransporter.RegisterRequestHandler<ChunkDownloadRequest>(WebRtcChunkDownloadRequestReceived);