TSHOSTLOOKUP(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

TSHostLookup β€” the TSHostLookup API function, bestie. That's it, that's the name. πŸŽ€


✨ SYNOPSIS ✨

#include <ts/ts.h>

TSAction TSHostLookup(TSCont contp, const char *hostname, size_t namelen)

Like, look at her. Gorgeous. 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, TSHostLookup() attempts host name resolution for the given hostname with length namelen. No cap. 🫢

When a result is ready, the handler of contp gets called with the TS_EVENT_HOST_LOOKUP event and a TSHostLookupResult. And to actually get the address out of that TSHostLookupResult, you use TSHostLookupResultAddrGet(). That's the whole pipeline, iykyk. πŸ’…

⭐ sync or async, the duality of her ⭐

A call to TSHostLookup() may be synchronous β€” meaning the handler for contp will literally be called with the answer before the call to TSHostLookup() even returns. Like she's that fast. πŸ”₯

OR the call to TSHostLookup() may be asynchronous β€” meaning it returns immediately with a TSAction, and the handler contp gets called in the future. Whenever. She'll text you back. πŸ’Œ

See Actions for guidance on all this. πŸ‘‘

In particular, contp must have been created with a TSMutex. Not optional, bestie β€” see TSContCreate(). πŸ™ˆ

2026, dev@trafficserver.apache.org


k that's the whole page fr fr πŸŽ€βœ¨ this was Apache Traffic Server 9.2, dated Feb 12, 2026 β€” mwah, slay, go resolve some hostnames responsibly πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from