This is a component of removing libevent as a dependency of the project. It is the first six commits of #32061 and provides a string-parsing utility (LineReader) that is also consumed by #34158.
These are the functions that are added / updated for HTTP and Torcontrol:
GetBindAddress(): Given a socket, provides the bound address as a CService. Currently used by p2p but moved fromnettonetbaseso other modules can call it.ToIntegral(): Already used to parse numbers from strings, added new argumentbase = 10so it can also be used to parse hexadecimal integers. HTTP chunked transfer-encoding uses hex-encoded integers to specify payload size: https://datatracker.ietf.org/doc/html/rfc7230.html#section-4.1AsciiCaseInsensitivecomparators: Needed to store HTTP headers in anunordered_map. Headers are key-value pairs that are parsed with case-insensitive keys: https://httpwg.org/specs/rfc9110.html#rfc.section.5.1FormatRFC1123DateTime(): The required datetime format for HTTP headers (e.g.Fri, 31 May 2024 19:18:04 GMT)LineReader: Fields in HTTP requests are newline-terminated. This struct is given an input buffer and provides methods to read lines as strings.