| 6863 | } |
| 6864 | |
| 6865 | TSReturnCode |
| 6866 | TSHttpTxnClientStreamPriorityGet(TSHttpTxn txnp, TSHttpPriority *priority) |
| 6867 | { |
| 6868 | static_assert(sizeof(TSHttpPriority) >= sizeof(TSHttp2Priority), |
| 6869 | "TSHttpPriorityType is incorrectly smaller than TSHttp2Priority."); |
| 6870 | sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); |
| 6871 | sdk_assert(priority != nullptr); |
| 6872 | |
| 6873 | auto *sm = reinterpret_cast<HttpSM *>(txnp); |
| 6874 | auto *stream = dynamic_cast<Http2Stream *>(sm->get_ua_txn()); |
| 6875 | if (stream == nullptr) { |
| 6876 | return TS_ERROR; |
| 6877 | } |
| 6878 | |
| 6879 | auto *priority_out = reinterpret_cast<TSHttp2Priority *>(priority); |
| 6880 | priority_out->priority_type = HTTP_PRIORITY_TYPE_HTTP_2; |
| 6881 | priority_out->stream_dependency = stream->get_transaction_priority_dependence(); |
| 6882 | priority_out->weight = stream->get_transaction_priority_weight(); |
| 6883 | |
| 6884 | return TS_SUCCESS; |
| 6885 | } |
| 6886 | |
| 6887 | TSReturnCode |
| 6888 | TSAIORead(int fd, off_t offset, char *buf, size_t buffSize, TSCont contp) |
no test coverage detected