diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-08-26 11:04:59 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-08-26 11:04:59 +0300 |
| commit | f851e980e49a4737e03335665b9c3a3a529ea326 (patch) | |
| tree | f9a2877bd8cd4886f9d5fa4a86805f47cf1e2fb1 /Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs | |
| parent | ce95311e3ca782c405591d12da7cf4366c8dcfb2 (diff) | |
| parent | d493603b5c99e0f0ba6858ba9011c83baa780d3b (diff) | |
| download | Tango-f851e980e49a4737e03335665b9c3a3a529ea326.tar.gz Tango-f851e980e49a4737e03335665b9c3a3a529ea326.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs | 10 |
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); |
