FMLiveSwitchConnectionStateLedger Class Reference

Maintains a ledger of connection state transitions with timestamps. More...

Instance Methods

(NSString *) - description
 Provides a string representation of all recorded state transitions. More...
 
(instancetype) - initWithConnectionId:client:connectionType:clientId:mediaProtocol:
 Initializes a new instance of the ConnectionStateLedger class. More...
 
(void) - recordActiveCandidatePairSet
 Records setting active candidate pair. More...
 
(void) - recordActiveCandidatePairUnset
 Records removal of active candidate pair. More...
 
(void) - recordAnswerWithState:sent:renegotiation:
 Records an offer. More...
 
(void) - recordConnectionState:
 Records a new connection state transition with current timestamp. More...
 
(void) - recordDtlsConnected
 Records the event indicating that DTLS transport is Connected. More...
 
(void) - recordDtlsConnecting
 Records the event indicating that DTLS transport is Connecting. More...
 
(void) - recordDtlsPossiblyBlockedWithTimeSinceHandshakeStartMs:
 Records the event that DTLS is possible blocked. More...
 
(void) - recordErrorWithState:error:
 Records an error. More...
 
(void) - recordLocalCertificateWithCertificate64:asn164:
 Records local DTLS certificate. More...
 
(void) - recordMediaIntentWithState:sent:
 Records a media intent with current timestamp. More...
 
(void) - recordOfferWithState:sent:renegotiation:
 Records an offer. More...
 
(void) - recordPeerReflexiveRemoteCandidateDiscovered
 Records a discovered peer reflexive remote candidate. More...
 
(void) - recordProcessedRemoteCandidateWithState:
 Records a signaled remote candidate. More...
 
(void) - recordSignaledRemoteCandidateWithState:
 Records a signaled remote candidate. More...
 

Class Methods

(FMLiveSwitchConnectionStateLedger *) + connectionStateLedgerWithConnectionId:client:connectionType:clientId:mediaProtocol:
 Initializes a new instance of the ConnectionStateLedger class. More...
 

Detailed Description

Maintains a ledger of connection state transitions with timestamps.

Tracks the history of state changes for a specific connection.

Method Documentation

◆ connectionStateLedgerWithConnectionId:client:connectionType:clientId:mediaProtocol:

+ (FMLiveSwitchConnectionStateLedger*) connectionStateLedgerWithConnectionId: (NSString *)  connectionId
client: (bool)  client
connectionType: (NSString *)  connectionType
clientId: (NSString *)  clientId
mediaProtocol: (FMLiveSwitchMediaProtocol)  mediaProtocol 

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.
clientIndicates whether this ledger is for the client rather than for a server.
connectionTypeIndicates the connection type.
clientIdThe unique identifier for the client.
mediaProtocolThe media protocol of this connection.

◆ description

- (NSString*) description

Provides a string representation of all recorded state transitions.

Returns
A formatted string showing all state transitions with timestamps and durations.

◆ initWithConnectionId:client:connectionType:clientId:mediaProtocol:

- (instancetype) initWithConnectionId: (NSString *)  connectionId
client: (bool)  client
connectionType: (NSString *)  connectionType
clientId: (NSString *)  clientId
mediaProtocol: (FMLiveSwitchMediaProtocol)  mediaProtocol 

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.
clientIndicates whether this ledger is for the client rather than for a server.
connectionTypeIndicates the connection type.
clientIdThe unique identifier for the client.
mediaProtocolThe media protocol of this connection.

◆ recordActiveCandidatePairSet

- (void) recordActiveCandidatePairSet

Records setting active candidate pair.

◆ recordActiveCandidatePairUnset

- (void) recordActiveCandidatePairUnset

Records removal of active candidate pair.

◆ recordAnswerWithState:sent:renegotiation:

- (void) recordAnswerWithState: (FMLiveSwitchConnectionState)  state
sent: (bool)  sent
renegotiation: (bool)  renegotiation 

Records an offer.

◆ recordConnectionState:

- (void) recordConnectionState: (FMLiveSwitchConnectionState)  state

Records a new connection state transition with current timestamp.

Parameters
stateThe new connection state to record.

◆ recordDtlsConnected

- (void) recordDtlsConnected

Records the event indicating that DTLS transport is Connected.

◆ recordDtlsConnecting

- (void) recordDtlsConnecting

Records the event indicating that DTLS transport is Connecting.

◆ recordDtlsPossiblyBlockedWithTimeSinceHandshakeStartMs:

- (void) recordDtlsPossiblyBlockedWithTimeSinceHandshakeStartMs: (int)  timeSinceHandshakeStartMs

Records the event that DTLS is possible blocked.

◆ recordErrorWithState:error:

- (void) recordErrorWithState: (FMLiveSwitchConnectionState)  state
error: (NSString *)  error 

Records an error.

◆ recordLocalCertificateWithCertificate64:asn164:

- (void) recordLocalCertificateWithCertificate64: (NSString *)  certificate64
asn164: (NSString *)  asn164 

Records local DTLS certificate.

Parameters
certificate64Hexadecimal representation of the certificate.
asn164Hexadecimal representation of the ASN.1 of the certificate.

◆ recordMediaIntentWithState:sent:

- (void) recordMediaIntentWithState: (FMLiveSwitchConnectionState)  state
sent: (bool)  sent 

Records a media intent with current timestamp.

◆ recordOfferWithState:sent:renegotiation:

- (void) recordOfferWithState: (FMLiveSwitchConnectionState)  state
sent: (bool)  sent
renegotiation: (bool)  renegotiation 

Records an offer.

◆ recordPeerReflexiveRemoteCandidateDiscovered

- (void) recordPeerReflexiveRemoteCandidateDiscovered

Records a discovered peer reflexive remote candidate.

◆ recordProcessedRemoteCandidateWithState:

- (void) recordProcessedRemoteCandidateWithState: (FMLiveSwitchConnectionState)  state

Records a signaled remote candidate.

◆ recordSignaledRemoteCandidateWithState:

- (void) recordSignaledRemoteCandidateWithState: (FMLiveSwitchConnectionState)  state

Records a signaled remote candidate.