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

Method client_fastopen_supported

src/iocore/eventsystem/UnixSocket.cc:144–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144bool
145UnixSocket::client_fastopen_supported()
146{
147 ats_scoped_fd fd{::open("/proc/sys/net/ipv4/tcp_fastopen", O_RDONLY)};
148 unsigned int bitfield{read_uint_from_fd(fd.get())};
149 return bitfield & static_cast<unsigned int>(TCPFastopenMask::CLIENT_ENABLE);
150}
151
152static unsigned int
153read_uint_from_fd(int fd)

Callers

nothing calls this directly

Calls 2

read_uint_from_fdFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected