Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

TSHostLookupResultAddrGet - TSHostLookupResultAddrGet API function

Description

       Retrieves the pointer to a sockaddr of a the given lookup_result from a previous call to TSHostLookup().

       For example:

          int
          handler(TSCont contp, TSEvent event, void *edata) {
              if (event == TS_EVENT_HOST_LOOKUP) {
                  const sockaddr *addr = TSHostLookupResultAddrGet(static_cast<TSHostLookupResult>(edata));
                  // TODO Add logic here.
              }
          }

Name

       TSHostLookupResultAddrGet - TSHostLookupResultAddrGet API function

Synopsis

          #include <ts/ts.h>

       sockaddrconst*TSHostLookupResultAddrGet(TSHostLookupResultlookup_result)

See Also