Class WebRTCWebSocketClient
This class is NOT a required component for using WebRTC. It is a convenience class provided to assist when using a corresponding WebRTC peer running a web socket server (which is the case for most of the demo applications that go with this library).
Inheritance
System.Object
WebRTCWebSocketClient
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class WebRTCWebSocketClient
Constructors
| Improve this Doc View SourceWebRTCWebSocketClient(String, Func<Task<RTCPeerConnection>>)
Default constructor.
Declaration
public WebRTCWebSocketClient(string webSocketServer, Func<Task<RTCPeerConnection>> createPeerConnection)
Parameters
Type | Name | Description |
---|---|---|
System.String | webSocketServer | The web socket server URL to connect to for the SDP and ICE candidate exchange. |
System.Func<System.Threading.Tasks.Task<RTCPeerConnection>> | createPeerConnection |
Properties
| Improve this Doc View SourceRTCPeerConnection
Declaration
public RTCPeerConnection RTCPeerConnection { get; }
Property Value
Type | Description |
---|---|
RTCPeerConnection |
Methods
| Improve this Doc View SourceStart(CancellationToken)
Creates a new WebRTC peer connection and then starts polling the web socket server. An SDP offer is expected from the server. Once it has been received an SDP answer will be returned.
Declaration
public async Task Start(CancellationToken cancellation)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellation |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |