Repository: trafficserver Updated Branches: refs/heads/master a4b079632 -> 726b68c69
Doc: jpeach suggested tweaks and amc tweaks. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/726b68c6 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/726b68c6 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/726b68c6 Branch: refs/heads/master Commit: 726b68c694458f05ecd8d54f512fdfc2e15225e5 Parents: a4b0796 Author: Alan M. Carroll <[email protected]> Authored: Sun Jun 8 17:44:10 2014 -0500 Committer: Alan M. Carroll <[email protected]> Committed: Mon Jun 9 13:29:27 2014 -0500 ---------------------------------------------------------------------- doc/ext/traffic-server.py | 6 +++++- .../api/TSHttpConnectWithPluginId.en.rst | 18 +++++++++++------- doc/reference/api/TSUrlHostSet.en.rst | 12 ++++++------ 3 files changed, 22 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/726b68c6/doc/ext/traffic-server.py ---------------------------------------------------------------------- diff --git a/doc/ext/traffic-server.py b/doc/ext/traffic-server.py index bae9c6b..4b2d9ec 100644 --- a/doc/ext/traffic-server.py +++ b/doc/ext/traffic-server.py @@ -198,12 +198,16 @@ class TrafficServerDomain(Domain): yield var, var, 'cv', doc, var, 1 # These types are ignored as missing references for the C++ domain. +# We really need to do better with this. Editing this file for each of +# these is already getting silly. EXTERNAL_TYPES = set(( 'int', 'uint', 'uint8_t', 'uint16_t', 'uint24_t', 'uint32_t', 'uint64_t', 'int8_t', 'int16_t', 'int24_t', 'int32_t', 'int64_t', + 'unsigned', 'unsigned int', 'off_t', 'size_t', 'time_t', 'Event', 'INK_MD5', 'DLL<EvacuationBlock>', + 'sockaddr' )) # Clean up specific references that we know will never be defined but are implicitly used by @@ -212,7 +216,7 @@ def xref_cleanup(app, env, node, contnode): rdomain = node['refdomain'] rtype = node['reftype'] rtarget = node['reftarget'] - if 'cpp' == rdomain: + if ('cpp' == rdomain) or ('c' == rdomain): if 'type' == rtype: # one of the predefined type, or a pointer or reference to it. if (rtarget in EXTERNAL_TYPES) or (('*' == rtarget[-1] or '&' == rtarget[-1]) and rtarget[:-1] in EXTERNAL_TYPES): http://git-wip-us.apache.org/repos/asf/trafficserver/blob/726b68c6/doc/reference/api/TSHttpConnectWithPluginId.en.rst ---------------------------------------------------------------------- diff --git a/doc/reference/api/TSHttpConnectWithPluginId.en.rst b/doc/reference/api/TSHttpConnectWithPluginId.en.rst index 2ddc7aa..b333eca 100644 --- a/doc/reference/api/TSHttpConnectWithPluginId.en.rst +++ b/doc/reference/api/TSHttpConnectWithPluginId.en.rst @@ -35,22 +35,26 @@ Description This call attempts to create an HTTP state machine and a virtual connection to that state machine. This is more efficient than using :c:func:`TSNetConnect` because it avoids using the operating system stack via the loopback interface. *addr* - This is the network address of the target of the connection. This includes the port which should be stored in the :c:type:`sockaddr` structure. + This is the network address of the target of the connection. This includes the port which should be stored in the :c:type:`sockaddr` structure pointed at by :arg:`addr`. *tag* - This is a tag that is passed through to the HTTP state machine. It must be a persistent string that has a lifetime longer than the connection. It is accessible via the log field :ref:`pitag <pitag>`. This is intended as a class or type identifier that is consistent across all connections for this plugin. In effect, the name of the plugin. This can be ``NULL``. + This is a tag that is passed through to the HTTP state machine. It must be a persistent string that has a lifetime longer than the connection. It is accessible via the log field :ref:`pitag <pitag>`. This is intended as a class or type identifier that is consistent across all connections for this plugin. In effect, the name of the plugin. This can be :literal:`NULL`. *id* - This is a numeric identifier that is passed through to the HTTP state machine. It is accessible via the log field :ref:`piid <piid>`. This is intended as a connection identifier and should be distinct for every call to ``TSHttpConnectWithPluginID``. The easiest mechanism is to define a plugin global value and increment it for each connection. The value ``0`` is reserved to mean "not set" and can be used as a default if this functionality is not needed. + This is a numeric identifier that is passed through to the HTTP state machine. It is accessible via the log field :ref:`piid <piid>`. This is intended as a connection identifier and should be distinct for every call to :c:func:`TSHttpConnectWithPluginId`. The easiest mechanism is to define a plugin global value and increment it for each connection. The value :literal:`0` is reserved to mean "not set" and can be used as a default if this functionality is not needed. -The virtual connection returned as the ``TSCVonn`` is API equivalent to a network virtual connection both to the plugin and to internal mechanisms. Data is read and written to the connection (and thence to the target system) by reading and writing on this virtual connection. +The virtual connection returned as the :c:type:`TSCVonn` is API equivalent to a network virtual connection both to the plugin and to internal mechanisms. Data is read and written to the connection (and thence to the target system) by reading and writing on this virtual connection. .. note:: This function only opens the connection - to drive the transaction an actual HTTP request must be sent and the HTTP response handled. The transaction is handled as a standard HTTP transaction and all of the standard configuration options and plugins will operate on it. The combination of tag and id is intended to enable correlation in log post processing. The tag identifies the connection as related to the plugin and the id can be used in conjuction with plugin generated logs to correlate the log records. -This should also be useful for debugging by tagging not just the HTTP state machine but also the plugin's virtual connections (which are of type ``PluginVC``) with data that be correlated with the source plugin. - .. topic:: Example - The SPDY plugin uses this to correlate client sessions with SPDY streams. Each client connection is assigned a distinct numeric identifier. This is passed as the *id* to ``TSHttpConnectWithPluginId``. The *tag* is selected to be the NPN string for the client session protocol, e.g. "spdy/3" or "spdy/3.1". Log post processing can then count the number of connections for the various supported protocols and the number of SPDY virtual streams for each real client connection to Traffic Server. + The SPDY implementation uses this to correlate client sessions with SPDY streams. Each client connection is assigned a distinct numeric identifier. This is passed as the :arg:`id` to :c:func:`TSHttpConnectWithPluginId`. The :arg:`tag` is selected to be the NPN string for the client session protocol, e.g. "spdy/3" or "spdy/3.1". Log post processing can then count the number of connections for the various supported protocols and the number of SPDY virtual streams for each real client connection to Traffic Server. + +See also +======== +:manpage:`TSHttpConnect(3ts)`, +:manpage:`TSNetConnect(3ts)`, +:manpage:`TSAPI(3ts)` http://git-wip-us.apache.org/repos/asf/trafficserver/blob/726b68c6/doc/reference/api/TSUrlHostSet.en.rst ---------------------------------------------------------------------- diff --git a/doc/reference/api/TSUrlHostSet.en.rst b/doc/reference/api/TSUrlHostSet.en.rst index 8935ed9..7c7c8dc 100644 --- a/doc/reference/api/TSUrlHostSet.en.rst +++ b/doc/reference/api/TSUrlHostSet.en.rst @@ -50,14 +50,14 @@ information. :func:`TSUrlSchemeSet`, :func:`TSUrlUserSet`, :func:`TSUrlPasswordSet`, :func:`TSUrlHostSet`, :func:`TSUrlHttpParamsSet`, :func:`TSUrlHttpQuerySet` and :func:`TSUrlHttpFragmentSet` each set the specified portion of the URL -located at offset within the marshal buffer :data:`bufp` to the string -value. If :data:`length` is :data:`-1` then these functions assume that value -is NULL-terminated. Otherwise, the length of the :data:`string` value is taken -to be the value of :data:`length`. These functions copy the string to within -:data:`bufp`, so it can be subsequently modified or deleted. +located at offset within the marshal buffer :arg:`bufp` to the string +value. If :arg:`length` is ``-1`` then these functions assume that value +is NULL-terminated. Otherwise, the length of the :arg:`string` value is taken +to be the value of :arg:`length`. These functions copy the string to within +:arg:`bufp`, so it can be subsequently modified or deleted. :func:`TSUrlPortSet` sets the port number portion of the URL located at -:data:`offset` within the marshal buffer :data:`bufp` to the value +:arg:`offset` within the marshal buffer :arg:`bufp` to the value port. Normal canonicalization based on the URL scheme still applies. Return values
