.\" Man page generated from reStructuredText. . .TH "TSHTTPTXNSERVERADDRSET" "3ts" "January 24, 2017" "7.0" "Apache Traffic Server" .SH NAME TSHttpTxnServerAddrSet \- . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B TSReturnCode TSHttpTxnServerAddrGet(TSHttpTxn\fI\ txnp\fP, struct sockaddr const*\fI\ addr\fP) .UNINDENT .SH DESCRIPTION .sp Set the origin server address for transaction \fItxnp\fP\&. This includes the port in \fIaddr\fP\&. The address family is also set by the contents of \fIaddr\fP\&. The address data is copied out of \fIaddr\fP so there is no dependency on the lifetime of that object. .sp This hook must be called no later than TS_HTTP_OS_DNS_HOOK. If this is called prior to TS_HTTP_OS_DNS_HOOK, DNS resolution will not be done as the address of the server is already known. .SH RETURN VALUE .sp \fBTS_ERROR\fP is returned if \fIaddr\fP does not contain a valid IPv4 or IPv6 address with a valid (non\-zero) port. .SH NOTES .sp If Traffic Server is configured to retry connections to origin servers and \fI\%TSHttpTxnServerAddrGet()\fP has been called, Traffic Server will return to TS_HTTP_OS_DNS_HOOK so to let the plugin set a different server address. Plugins should be prepared for TS_HTTP_OS_DNS_HOOK and any subsequent hooks to be called multiple times. .sp Once a plugin calls \fI\%TSHttpTxnServerAddrGet()\fP any prior DNS resolution results are lost. The plugin should use \fI\%TSHttpTxnServerAddrGet()\fP to preserve any DNS Results that might need. .SH SEE ALSO .sp \fITSAPI(3ts)\fP, \fITSHttpTxnServerAddrGet(3ts)\fP .SH COPYRIGHT 2015, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .