logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TSHttpTxnClientStreamPriorityGet - TSHttpTxnClientStreamPriorityGet API function

Description

       Retrieve  the  priority  information  for  the HTTP stream associated with the provided transaction.  The
       resultant priority information is populated in the priority output variable. The TSHttpPriority  type  is
       designed  to be agnostic of the various HTTP protocol versions that support HTTP streams. The user should
       pass a pointer casted to TSHttpPriority from  a  previously  allocated  TSHttp2Priority  structure.  This
       design anticipates future support for HTTP versions that support streams, such as HTTP/3.

       The TSHttp2Priority structure has the following declaration:

          typedef struct {
            uint8_t priority_type; /** HTTP_PROTOCOL_TYPE_HTTP_2 */
            int32_t stream_dependency;
            uint8_t weight;
          } TSHttp2Priority;

       In  a  call  to  TSHttpTxnClientStreamPriorityGet,  the  dependency  and  weight will be populated in the
       stream_dependency and weight members, respectively.  If the stream associated with the given  transaction
       has no dependency, then the stream_dependency output parameter will be populated with -1 and the value of
       weight will be meaningless. See RFC7540 section 5.3 for details concerning HTTP/2 stream priority.

       This API returns an error if the provided transaction is not an HTTP/2 transaction.

Name

       TSHttpTxnClientStreamPriorityGet - TSHttpTxnClientStreamPriorityGet API function

See Also

TSHttpTxnClientStreamIdGet

Synopsis

          #include <ts/ts.h>

       TSReturnCodeTSHttpTxnClientStreamPriorityGet(TSHttpTxntxnp,TSHttpPriority*priority)

See Also