Skip to content

Commit

Permalink
Fix merge issues for SipSorcery.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 18, 2021
1 parent f72acc8 commit de0a8d3
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 87 deletions.
2 changes: 1 addition & 1 deletion Desktop.Core/Desktop.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
<PackageReference Include="SIPSorcery" Version="5.1.1" />
<PackageReference Include="SIPSorcery" Version="5.1.8-pre" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions Desktop.Core/Services/Viewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
using System.Linq;
using System.Threading.Tasks;
using System.Text.Json;
using System.Threading;
using System.Diagnostics;

namespace Remotely.Desktop.Core.Services
{
Expand Down
19 changes: 8 additions & 11 deletions Desktop.Core/Services/WebRtcSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void Dispose()
GC.SuppressFinalize(this);
}

public Task Init(IceServerModel[] iceServers)
public async Task Init(IceServerModel[] iceServers)
{
Logger.Write("Starting WebRTC connection.");

Expand All @@ -85,23 +85,22 @@ public Task Init(IceServerModel[] iceServers)
PeerSession.onicecandidate += PeerSession_onicecandidate;

var dataChannelInit = new RTCDataChannelInit();
CaptureChannel = PeerSession.createDataChannel("RemoteControl", dataChannelInit);
CaptureChannel = await PeerSession.createDataChannel("RemoteControl", dataChannelInit);

CaptureChannel.onDatamessage += CaptureChannel_onDatamessage;
CaptureChannel.onmessage += CaptureChannel_onmessage; ;
CaptureChannel.onclose += CaptureChannel_onclose;
CaptureChannel.onopen += CaptureChannel_onopen;
CaptureChannel.onerror += CaptureChannel_onerror;

var offer = PeerSession.createOffer(new RTCOfferOptions());
LocalSdpReady?.Invoke(this, offer);

return Task.CompletedTask;
}


public async Task SendDto<T>(T dto) where T : BaseDto

public Task SendDto<T>(T dto) where T : BaseDto
{
await CaptureChannel.sendasync(MessagePackSerializer.Serialize(dto));
return Task.Run(() => CaptureChannel.send(MessagePackSerializer.Serialize(dto)));
}

public Task SetRemoteDescription(string type, string sdp)
Expand All @@ -127,13 +126,11 @@ public Task SetRemoteDescription(string type, string sdp)
return Task.CompletedTask;
}

private async void CaptureChannel_onDatamessage(byte[] obj)
private async void CaptureChannel_onmessage(RTCDataChannel dc, DataChannelPayloadProtocols protocol, byte[] data)
{
await RtcMessageHandler.ParseMessage(Viewer, obj);
await RtcMessageHandler.ParseMessage(Viewer, data);
}



private async void CaptureChannel_onerror(string obj)
{
// Clear the queue when WebRTC state changes.
Expand Down
1 change: 0 additions & 1 deletion Server/wwwroot/src/RemoteControl/Enums/BaseDtoType.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Server/wwwroot/src/RemoteControl/Enums/BaseDtoType.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions Server/wwwroot/src/RemoteControl/InputEventHandlers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Server/wwwroot/src/RemoteControl/InputEventHandlers.js.map

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions Server/wwwroot/src/RemoteControl/Interfaces/Dtos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Server/wwwroot/src/RemoteControl/Interfaces/Dtos.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Server/wwwroot/src/RemoteControl/Interfaces/Settings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export interface Settings {
streamModeEnabled: boolean;
displayName: string;
}
6 changes: 1 addition & 5 deletions Server/wwwroot/src/RemoteControl/MessageSender.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit de0a8d3

Please sign in to comment.