Пример #1
0
 private async void GetOfferAsync(WebRTCCommons.CustomAwaiter<string> awaiter)
 {
     string sdp = await mConnection.GenerateOffer();
     awaiter.SetComplete(sdp);
 }
Пример #2
0
 private async void GetOfferResponseAsync(WebRTCCommons.CustomAwaiter<byte[]> awaiter, string offer)
 {
     string offerResponse = await mConnection.SetOffer(offer);
     byte[] r = UTF8Encoding.UTF8.GetBytes("HTTP/1.1 200 OK\r\nContent-Type: text/sdp\r\nConnection: close\r\nContent-Length: " + offerResponse.Length.ToString() + "\r\n\r\n" + offerResponse);
     awaiter.SetComplete(r);
 }