TSHOSTLOOKUP(3ts)
π 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,contpmust have been created with aTSMutex. Not optional, bestie β seeTSContCreate(). π
π COPYRIGHT π
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
- ubuntu noble: trafficserver-dev 9.2.3+ds-1+deb12u1ubuntu0.1 Β· Apache-2.0
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms