Class WebRTCRestSignalingPeer
This class is not a required component for using WebRTC. It is a convenience class provided to perform the signalling via a HTTP REST server.
Inheritance
Inherited Members
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class WebRTCRestSignalingPeer
Constructors
| Improve this Doc View SourceWebRTCRestSignalingPeer(String, String, String, Func<Task<RTCPeerConnection>>)
Default constructor.
Declaration
public WebRTCRestSignalingPeer(string restServerUri, string ourID, string theirID, Func<Task<RTCPeerConnection>> createPeerConnection)
Parameters
Type | Name | Description |
---|---|---|
System.String | restServerUri | The base URI of the HTTP REST server API. |
System.String | ourID | The arbitrary ID this peer is using. |
System.String | theirID | The arbitrary ID the remote peer is using. |
System.Func<System.Threading.Tasks.Task<RTCPeerConnection>> | createPeerConnection | Function delegate used to create a new WebRTC peer connection. |
Properties
| Improve this Doc View SourceAnswerOptions
Optional property to allow the peer connection SDP answer options to be set.
Declaration
public RTCAnswerOptions AnswerOptions { get; set; }
Property Value
Type | Description |
---|---|
RTCAnswerOptions |
FilterRemoteICECandidates
Optional filter that can be applied to remote ICE candidates. The filter is primarily intended for use in testing. In real application scenarios it's normally desirable to accept all remote ICE candidates.
Declaration
public Func<RTCIceCandidateInit, bool> FilterRemoteICECandidates { get; set; }
Property Value
Type | Description |
---|---|
System.Func<RTCIceCandidateInit, System.Boolean> |
OfferOptions
Optional property to allow the peer connection SDP offer options to be set.
Declaration
public RTCOfferOptions OfferOptions { get; set; }
Property Value
Type | Description |
---|---|
RTCOfferOptions |
RTCPeerConnection
Declaration
public RTCPeerConnection RTCPeerConnection { get; }
Property Value
Type | Description |
---|---|
RTCPeerConnection |
Methods
| Improve this Doc View SourceStart(CancellationTokenSource)
Creates a new WebRTC peer connection and then starts polling the REST server. If there is an offer waiting for this peer it will be retrieved and an answer posted. If no offer is available we will post one and then poll for the answer,
Declaration
public async Task Start(CancellationTokenSource cancellation)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationTokenSource | cancellation |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |