dcsctp: Cleanup Metrics
This CL first restricts Metrics to be retrievable when the socket is created. This avoids having most fields as optional and makes it easier to add more metrics. Secondly, the peer implementation is moved into Metrics. Bug: webrtc:13052 Change-Id: I6cb53eeef3f84ac34f3efc883853338f903cc758 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262256 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36888}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
d14e8894fc
commit
f7fc71da44
@ -99,11 +99,11 @@ class DcSctpSocket : public DcSctpSocketInterface {
|
||||
size_t buffered_amount(StreamID stream_id) const override;
|
||||
size_t buffered_amount_low_threshold(StreamID stream_id) const override;
|
||||
void SetBufferedAmountLowThreshold(StreamID stream_id, size_t bytes) override;
|
||||
Metrics GetMetrics() const override;
|
||||
absl::optional<Metrics> GetMetrics() const override;
|
||||
HandoverReadinessStatus GetHandoverReadiness() const override;
|
||||
absl::optional<DcSctpSocketHandoverState> GetHandoverStateAndClose() override;
|
||||
SctpImplementation peer_implementation() const override {
|
||||
return peer_implementation_;
|
||||
return metrics_.peer_implementation;
|
||||
}
|
||||
// Returns this socket's verification tag, or zero if not yet connected.
|
||||
VerificationTag verification_tag() const {
|
||||
@ -282,8 +282,6 @@ class DcSctpSocket : public DcSctpSocketInterface {
|
||||
State state_ = State::kClosed;
|
||||
// If the connection is established, contains a transmission control block.
|
||||
std::unique_ptr<TransmissionControlBlock> tcb_;
|
||||
|
||||
SctpImplementation peer_implementation_ = SctpImplementation::kUnknown;
|
||||
};
|
||||
} // namespace dcsctp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user