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

Function synclient_txn_create

src/api/InkAPITest.cc:517–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515//////////////////////////////////////////////////////////////////////////////
516
517static ClientTxn *
518synclient_txn_create()
519{
520 const HttpProxyPort *proxy_port;
521
522 ClientTxn *txn = static_cast<ClientTxn *>(TSmalloc(sizeof(ClientTxn)));
523
524 ink_zero(*txn);
525
526 if (nullptr == (proxy_port = HttpProxyPort::findHttp(AF_INET))) {
527 txn->connect_port = PROXY_HTTP_DEFAULT_PORT;
528 } else {
529 txn->connect_port = proxy_port->m_port;
530 }
531
532 txn->connect_ip = IP(127, 0, 0, 1);
533 txn->status = REQUEST_INPROGRESS;
534 txn->magic = MAGIC_ALIVE;
535
536 Dbg(dbg_ctl_SockClient, "Connecting to proxy 127.0.0.1 on port %d", txn->connect_port);
537 return txn;
538}
539
540static int
541synclient_txn_delete(ClientTxn *txn)

Calls 3

TSmallocFunction · 0.85
ink_zeroFunction · 0.85
IPClass · 0.50

Tested by

no test coverage detected