Class ConnectionStateLedger
Maintains a ledger of connection state transitions with timestamps. Tracks the history of state changes for a specific connection.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class ConnectionStateLedger : object
Constructors
ConnectionStateLedger(String, Boolean, String, String, MediaProtocol)
Initializes a new instance of the ConnectionStateLedger class.
Declaration
public ConnectionStateLedger(string connectionId, bool client, string connectionType, string clientId, MediaProtocol mediaProtocol)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The unique identifier for the connection to track. |
System.Boolean | client | Indicates whether this ledger is for the client rather than for a server. |
System.String | connectionType | Indicates the connection type. |
System.String | clientId | The unique identifier for the client. |
MediaProtocol | mediaProtocol | The media protocol of this connection. |
Methods
RecordActiveCandidatePairSet()
Records setting active candidate pair.
Declaration
public void RecordActiveCandidatePairSet()
RecordActiveCandidatePairUnset()
Records removal of active candidate pair.
Declaration
public void RecordActiveCandidatePairUnset()
RecordAnswer(ConnectionState, Boolean, Boolean)
Records an offer.
Declaration
public void RecordAnswer(ConnectionState state, bool sent, bool renegotiation)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state | |
System.Boolean | sent | |
System.Boolean | renegotiation |
RecordConnectionState(ConnectionState)
Records a new connection state transition with current timestamp.
Declaration
public void RecordConnectionState(ConnectionState state)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state | The new connection state to record. |
RecordDtlsConnected()
Records the event indicating that DTLS transport is Connected.
Declaration
public void RecordDtlsConnected()
RecordDtlsConnecting()
Records the event indicating that DTLS transport is Connecting.
Declaration
public void RecordDtlsConnecting()
RecordError(ConnectionState, String)
Records an error.
Declaration
public void RecordError(ConnectionState state, string error)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state | |
System.String | error |
RecordLocalCertificate(String, String)
Records local DTLS certificate.
Declaration
public void RecordLocalCertificate(string certificate64, string asn164)
Parameters
Type | Name | Description |
---|---|---|
System.String | certificate64 | Hexadecimal representation of the certificate. |
System.String | asn164 | Hexadecimal representation of the ASN.1 of the certificate. |
RecordMediaIntent(ConnectionState, Boolean)
Records a media intent with current timestamp.
Declaration
public void RecordMediaIntent(ConnectionState state, bool sent)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state | |
System.Boolean | sent |
RecordOffer(ConnectionState, Boolean, Boolean)
Records an offer.
Declaration
public void RecordOffer(ConnectionState state, bool sent, bool renegotiation)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state | |
System.Boolean | sent | |
System.Boolean | renegotiation |
RecordPeerReflexiveRemoteCandidateDiscovered()
Records a discovered peer reflexive remote candidate.
Declaration
public void RecordPeerReflexiveRemoteCandidateDiscovered()
RecordProcessedRemoteCandidate(ConnectionState)
Records a signaled remote candidate.
Declaration
public void RecordProcessedRemoteCandidate(ConnectionState state)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state |
RecordReceivedIceApplicationData(String)
Records information about ICE application data received during connection establishment. This diagnostic information helps troubleshoot connectivity issues by showing what types of data were received from remote peers.
Declaration
public void RecordReceivedIceApplicationData(string data)
Parameters
Type | Name | Description |
---|---|---|
System.String | data | A summary string of the received application data |
RecordSignaledRemoteCandidate(ConnectionState)
Records a signaled remote candidate.
Declaration
public void RecordSignaledRemoteCandidate(ConnectionState state)
Parameters
Type | Name | Description |
---|---|---|
ConnectionState | state |
ToString()
Provides a string representation of all recorded state transitions.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A formatted string showing all state transitions with timestamps and durations. |