MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHttpTxnServerFdGet

Function TSHttpTxnServerFdGet

src/api/InkAPI.cc:6457–6475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6455}
6456
6457TSReturnCode
6458TSHttpTxnServerFdGet(TSHttpTxn txnp, int *fdp)
6459{
6460 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
6461 sdk_assert(sdk_sanity_check_null_ptr((void *)fdp) == TS_SUCCESS);
6462
6463 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
6464 *fdp = -1;
6465 TSReturnCode retval = TS_ERROR;
6466 ProxyTransaction *ss = sm->get_server_txn();
6467 if (ss != nullptr) {
6468 NetVConnection *vc = ss->get_netvc();
6469 if (vc != nullptr) {
6470 *fdp = vc->get_socket();
6471 retval = TS_SUCCESS;
6472 }
6473 }
6474 return retval;
6475}
6476
6477void
6478load_config_file_callback(const char *parent_file, const char *remap_file)

Callers 2

FDMethod · 0.85

Calls 5

sdk_sanity_check_txnFunction · 0.85
get_server_txnMethod · 0.80
get_netvcMethod · 0.45
get_socketMethod · 0.45

Tested by

no test coverage detected