Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions doc/developer-guide/api/functions/TSHttpTxnServerAddrSet.en.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.. Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright
ownership. The ASF licenses this file to you under the Apache
License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.

.. include:: ../../../common.defs

.. default-domain:: c

TSHttpTxnServerAddrSet
**********************

Synopsis
========

`#include <ts/ts.h>`

.. function:: 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.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ The HTTP transaction functions are:

- :c:func:`TSHttpTxnNextHopAddrGet`

- :c:func:`TSHttpTxnNextHopAddrSet`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you want TSHttpTxnServerAddrSet ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I messed up the cut and paste. I'll fix it before committing.


- :c:func:`TSHttpTxnParentProxySet`

- :c:func:`TSHttpTxnReenable`
Expand Down