Class: WebRTC::RTCTransportStats
- Defined in:
- lib/webrtc/stats_report.rb
Constant Summary
Constants inherited from RTCStats
Instance Attribute Summary collapse
-
#bytes_received ⇒ Object
readonly
Returns the value of attribute bytes_received.
-
#bytes_sent ⇒ Object
readonly
Returns the value of attribute bytes_sent.
-
#dtls_state ⇒ Object
readonly
Returns the value of attribute dtls_state.
-
#selected_candidate_pair_id ⇒ Object
readonly
Returns the value of attribute selected_candidate_pair_id.
Attributes inherited from RTCStats
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RTCTransportStats
constructor
A new instance of RTCTransportStats.
- #to_h ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ RTCTransportStats
Returns a new instance of RTCTransportStats.
135 136 137 138 139 140 141 |
# File 'lib/webrtc/stats_report.rb', line 135 def initialize( = {}) super(.merge(type: :transport)) @bytes_sent = [:bytes_sent] || 0 @bytes_received = [:bytes_received] || 0 @dtls_state = [:dtls_state] || :new @selected_candidate_pair_id = [:selected_candidate_pair_id] end |
Instance Attribute Details
#bytes_received ⇒ Object (readonly)
Returns the value of attribute bytes_received.
133 134 135 |
# File 'lib/webrtc/stats_report.rb', line 133 def bytes_received @bytes_received end |
#bytes_sent ⇒ Object (readonly)
Returns the value of attribute bytes_sent.
133 134 135 |
# File 'lib/webrtc/stats_report.rb', line 133 def bytes_sent @bytes_sent end |
#dtls_state ⇒ Object (readonly)
Returns the value of attribute dtls_state.
133 134 135 |
# File 'lib/webrtc/stats_report.rb', line 133 def dtls_state @dtls_state end |
#selected_candidate_pair_id ⇒ Object (readonly)
Returns the value of attribute selected_candidate_pair_id.
133 134 135 |
# File 'lib/webrtc/stats_report.rb', line 133 def selected_candidate_pair_id @selected_candidate_pair_id end |
Instance Method Details
#to_h ⇒ Object
143 144 145 146 147 148 149 150 |
# File 'lib/webrtc/stats_report.rb', line 143 def to_h super.merge( bytesSent: @bytes_sent, bytesReceived: @bytes_received, dtlsState: @dtls_state, selectedCandidatePairId: @selected_candidate_pair_id ) end |