private async Task SetupPeer(Peer remotePeer, bool isInitiator) { var ortcController = new OrtcController(remotePeer, isInitiator); ortcController.DataChannelConnected += OrtcController_OnDataChannelConnected; ortcController.DataChannelDisconnected += OrtcController_OnDataChannelDisconnected; ortcController.SignalMessageToPeer += OrtcController_OnSignalMessageToPeer; ortcController.DataChannelMessage += OrtcController_OnDataChannelMessage; await ortcController.SetupAsync(); }
private async Task SetupPeer(Peer remotePeer, bool isInitiator) { SendMessageToRemotePeer += PeersListPage_SendMessageToRemotePeer; _ortcController = new OrtcController(remotePeer, isInitiator); _ortcController.DataChannelConnected += OrtcController_OnDataChannelConnected; _ortcController.DataChannelDisconnected += OrtcController_OnDataChannelDisconnected; _ortcController.SignalMessageToPeer += OrtcController_OnSignalMessageToPeer; _ortcController.DataChannelMessage += OrtcController_OnDataChannelMessage; await _ortcController.SetupAsync(); }