| 926 | } |
| 927 | |
| 928 | std::string Socket::OnDescription() const { |
| 929 | // NOTE: The output of `description()' should be consistent with operator<<() |
| 930 | std::string result; |
| 931 | result.reserve(64); |
| 932 | const int saved_fd = fd(); |
| 933 | if (saved_fd >= 0) { |
| 934 | butil::string_appendf(&result, "fd=%d ", saved_fd); |
| 935 | } |
| 936 | butil::string_appendf(&result, "addr=%s", |
| 937 | butil::endpoint2str(remote_side()).c_str()); |
| 938 | const int local_port = local_side().port; |
| 939 | if (local_port > 0) { |
| 940 | butil::string_appendf(&result, ":%d", local_port); |
| 941 | } |
| 942 | return result; |
| 943 | } |
| 944 | |
| 945 | void Socket::HoldHCRelatedRef() { |
| 946 | if (_health_check_interval_s > 0) { |
nothing calls this directly
no test coverage detected