MCPcopy Create free account
hub / github.com/apache/trafficserver / initialize

Method initialize

src/cripts/Connections.cc:50–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void
51detail::ConnBase::TcpInfo::initialize()
52{
53#if defined(TCP_INFO) && defined(HAVE_STRUCT_TCP_INFO)
54 _ensure_initialized(_owner);
55 if (!_ready) {
56 int connfd = _owner->FD();
57
58 TSAssert(_owner->_state->txnp);
59 if (connfd < 0 || TSHttpTxnIsInternal(_owner->_state->txnp)) { // No TCPInfo for internal transactions
60 _ready = false;
61 // ToDo: Deal with errors?
62 } else {
63 if (getsockopt(connfd, IPPROTO_TCP, TCP_INFO, &info, &info_len) == 0) {
64 _ready = (info_len > 0);
65 }
66 }
67 }
68#endif
69}
70
71cripts::string_view
72detail::ConnBase::TcpInfo::Log()

Callers

nothing calls this directly

Calls 2

TSHttpTxnIsInternalFunction · 0.85
FDMethod · 0.80

Tested by

no test coverage detected