Inherits IDisposable.
Public Types | |
enum | State { State.NOT_STARTED, State.RUNNING, State.COMPLETED, State.FAILED } |
Public Member Functions | |
Session (Controller controller, bool isControlling) | |
void | SendInitialOffer (Action onOfferFailed, IPEndPoint remoteRelayEndPoint) |
void | CreatePermissionForRemoteOnLocalRelay (Action< Stun.Message > onSuccess, Action< Stun.Message > onFail) |
Allows the client's relay to send to and receive from the host's relay More... | |
void | CreatePermissionForLocalOnRemoteRelay (Action< Stun.Message > onSuccess, Action< Stun.Message > onFail) |
Allows the host's relay to send and receive from the client's relay. More... | |
void | SendOffer (IPEndPoint remoteRelayEndPoint, Action< Transaction< Sdp.Message >> onFail) |
void | BuildCandidatePairList () |
bool | PerformNextConnectivityCheck () |
bool | OnReceivedIncomingConnectivityCheck (Stun.Controller receivingStunController, Stun.Message request, IPEndPoint source, IPEndPoint receivedAt) |
void | CheckIfDone () |
void | Restart () |
void | HandleRoleConflictFromConnectivityCheckResponse (CandidatePair generatingPair, Transaction< Stun.Message > transaction) |
bool | HandleRoleConflictFromIncomingConnectivityCheck (Stun.Controller stunController, Stun.Message request, IPEndPoint source, IPEndPoint receivedAt) |
void | SendRoleConflictResponse (Stun.Controller stunController, Stun.Message request, IPEndPoint source, IPEndPoint receivedAt) |
CandidatePair | CreateNewCandidatePairIfNecessary (Stun.Controller stunController, Stun.Message request, IPEndPoint remoteEndPoint, IPEndPoint receivedAt) |
void | CleanUp (bool preserveSelectedPair=true) |
Used to clean up unused permissions and channels, or all permissions and channels More... | |
void | Dispose () |
Public Attributes | |
Guid | localUsernameFragment |
string | remoteUsernameFragment |
Guid | localPassword |
string | remotePassword |
State | state = State.NOT_STARTED |
List< Candidate > | remoteCandidates = new List<Candidate>() |
List< CandidatePair > | candidatePairs = new List<CandidatePair>() |
List< CandidatePair > | triggeredCheckQueue = new List<CandidatePair>() |
CandidatePair | defaultCandidatePair |
List< CandidatePair > | validCandidatePairs = new List<CandidatePair>() |
IPEndPoint | remoteRelayEndPoint |
bool | isControlling |
ulong | tieBreaker |
CandidatePair | selectedPair = null |
bool | isRestarting = false |
CandidatePair | candidatePairToReplaceAfterRestart |
IPEndPoint | remoteDefaultMediaAddress |
|
strong |
NobleConnect.Ice.Session.Session | ( | Controller | controller, |
bool | isControlling | ||
) |
void NobleConnect.Ice.Session.BuildCandidatePairList | ( | ) |
void NobleConnect.Ice.Session.CheckIfDone | ( | ) |
void NobleConnect.Ice.Session.CleanUp | ( | bool | preserveSelectedPair = true | ) |
Used to clean up unused permissions and channels, or all permissions and channels
The permissions are revoked that were used to send the sip invite and answer Channels are revoked for all candidate pairs (except the selected pair when preserving) Binding refreshes are cancelled for all candidate pairs (except the selected pair when preserving)
CandidatePair NobleConnect.Ice.Session.CreateNewCandidatePairIfNecessary | ( | Stun.Controller | stunController, |
Stun.Message | request, | ||
IPEndPoint | remoteEndPoint, | ||
IPEndPoint | receivedAt | ||
) |
void NobleConnect.Ice.Session.CreatePermissionForLocalOnRemoteRelay | ( | Action< Stun.Message > | onSuccess, |
Action< Stun.Message > | onFail | ||
) |
Allows the host's relay to send and receive from the client's relay.
The request is sent over the client's relay. This is because the client may not be able to directly communicate with the host's turn server This would be the case if the client is ipv4 and the hostRelayEndPoint is ipv6 or vice versa. The dual stack relays bridge the gap. Note that address family matters for peers. We must create a permission for the client relay address that has the same address family as the host relay address. If we use the wrong address then the host relay would see the invite as coming from a different address than the one we add permission for here and it will be rejected.
void NobleConnect.Ice.Session.CreatePermissionForRemoteOnLocalRelay | ( | Action< Stun.Message > | onSuccess, |
Action< Stun.Message > | onFail | ||
) |
Allows the client's relay to send to and receive from the host's relay
Note that address family matters for peers, so for dual stack relays the host will only be able to send a return message if it is targeted at the same address family as the hostRelayEndPoint. For example if the hostRelayEndPoint is an ipv4 address, and the host tries to send to a client's ipv6 relay address, it will appear to come from the host's ipv6 relay address instead of the ipv4 address that we created a permission for, so it will be rejected. Essentially what this means is that when a client sends a sip invite, the default media address has to be the same family as the hostRelayEndPoint so that when the host sends a return message it will come from the correct host relay address.
void NobleConnect.Ice.Session.Dispose | ( | ) |
void NobleConnect.Ice.Session.HandleRoleConflictFromConnectivityCheckResponse | ( | CandidatePair | generatingPair, |
Transaction< Stun.Message > | transaction | ||
) |
bool NobleConnect.Ice.Session.HandleRoleConflictFromIncomingConnectivityCheck | ( | Stun.Controller | stunController, |
Stun.Message | request, | ||
IPEndPoint | source, | ||
IPEndPoint | receivedAt | ||
) |
bool NobleConnect.Ice.Session.OnReceivedIncomingConnectivityCheck | ( | Stun.Controller | receivingStunController, |
Stun.Message | request, | ||
IPEndPoint | source, | ||
IPEndPoint | receivedAt | ||
) |
bool NobleConnect.Ice.Session.PerformNextConnectivityCheck | ( | ) |
void NobleConnect.Ice.Session.Restart | ( | ) |
void NobleConnect.Ice.Session.SendInitialOffer | ( | Action | onOfferFailed, |
IPEndPoint | remoteRelayEndPoint | ||
) |
void NobleConnect.Ice.Session.SendOffer | ( | IPEndPoint | remoteRelayEndPoint, |
Action< Transaction< Sdp.Message >> | onFail | ||
) |
void NobleConnect.Ice.Session.SendRoleConflictResponse | ( | Stun.Controller | stunController, |
Stun.Message | request, | ||
IPEndPoint | source, | ||
IPEndPoint | receivedAt | ||
) |
List<CandidatePair> NobleConnect.Ice.Session.candidatePairs = new List<CandidatePair>() |
CandidatePair NobleConnect.Ice.Session.candidatePairToReplaceAfterRestart |
CandidatePair NobleConnect.Ice.Session.defaultCandidatePair |
bool NobleConnect.Ice.Session.isControlling |
bool NobleConnect.Ice.Session.isRestarting = false |
Guid NobleConnect.Ice.Session.localPassword |
Guid NobleConnect.Ice.Session.localUsernameFragment |
IPEndPoint NobleConnect.Ice.Session.remoteDefaultMediaAddress |
string NobleConnect.Ice.Session.remotePassword |
IPEndPoint NobleConnect.Ice.Session.remoteRelayEndPoint |
string NobleConnect.Ice.Session.remoteUsernameFragment |
CandidatePair NobleConnect.Ice.Session.selectedPair = null |
State NobleConnect.Ice.Session.state = State.NOT_STARTED |
ulong NobleConnect.Ice.Session.tieBreaker |
List<CandidatePair> NobleConnect.Ice.Session.triggeredCheckQueue = new List<CandidatePair>() |
List<CandidatePair> NobleConnect.Ice.Session.validCandidatePairs = new List<CandidatePair>() |