TSHttpTxnServerAddrSet¶
Synopsis¶
#include <ts/ts.h>
-
TSReturnCode
TSHttpTxnServerAddrGet(TSHttpTxn txnp, struct sockaddr const* addr)¶
Description¶
Set the origin server address for transaction :arg:`txnp`. This includes the port in :arg:`addr`. The address family is also set by the contents of :arg:`addr`. The address data is copied out of :arg:`addr` so there is no dependency on the lifetime of that object.
This hook must be called no later than TS_HTTP_OS_DNS_HOOK. If this is called then DNS resolution will not be done as the address of the server is already know.
An error value is returned if :arg:`addr` does not contain a valid IPv4 or IPv6 address with a valid (non-zero) port.