public async Task <WebRtcTransport> CreateWebRtcTransportAsync(string peerId, string connectionId, CreateWebRtcTransportRequest createWebRtcTransportRequest, bool isSend) { using (await _peersLock.ReadLockAsync()) { if (!_peers.TryGetValue(peerId, out var peer)) { throw new PeerNotExistsException("CreateWebRtcTransport()", peerId); } CheckConnection(peer, connectionId); return(await peer.CreateWebRtcTransportAsync(createWebRtcTransportRequest, isSend)); } }
public async Task <WebRtcTransport> CreateWebRtcTransportAsync(string peerId, string connectionId, CreateWebRtcTransportRequest createWebRtcTransportRequest) { using (await _peersLock.ReadLockAsync()) { if (!_peers.TryGetValue(peerId, out var peer)) { throw new Exception($"CreateWebRtcTransport() | Peer:{peerId} is not exists"); } CheckConnection(peer, connectionId); return(await peer.CreateWebRtcTransportAsync(createWebRtcTransportRequest)); } }