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

Method _process_long_header_packet

src/iocore/net/QUICNet.cc:89–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88#else
89void
90QUICPollCont::_process_long_header_packet(QUICPollEvent *e, NetHandler *nh)
91{
92 UDPPacket *p = e->packet;
93 // FIXME: VC is nullptr ?
94 QUICNetVConnection *vc = static_cast<QUICNetVConnection *>(e->con);
95 uint8_t *buf = reinterpret_cast<uint8_t *>(p->getIOBlockChain()->buf());
96
97 QUICPacketType ptype;
98 QUICLongHeaderPacketR::type(ptype, buf, 1);
99 if (ptype == QUICPacketType::INITIAL && !vc->read.triggered) {
100 SCOPED_MUTEX_LOCK(lock, vc->mutex, this_ethread());
101 vc->read.triggered = 1;
102 vc->handle_received_packet(p);
103 vc->handleEvent(QUIC_EVENT_PACKET_READ_READY, nullptr);
104 e->free();
105
106 return;
107 }
108
109 if (vc) {
110 SCOPED_MUTEX_LOCK(lock, vc->mutex, this_ethread());
111 vc->read.triggered = 1;
112 vc->handle_received_packet(p);
113 } else {
114 this->_longInQueue.push(p);
115 }
116
117 // Push QUICNetVC into nethandler's enabled list
118 if (vc != nullptr) {
119 int isin = ink_atomic_swap(&vc->read.in_enabled_list, 1);
120 if (!isin) {
121 nh->read_enable_list.push(vc);
122 }
123 }
124
125 // Note: We should free QUICPollEvent here since vc could be freed from other thread.
126 e->free();
127}
128
129void
130QUICPollCont::_process_short_header_packet(QUICPollEvent *e, NetHandler *nh)

Callers 1

pollEventMethod · 0.95

Calls 9

this_ethreadFunction · 0.85
ink_atomic_swapFunction · 0.85
getIOBlockChainMethod · 0.80
typeClass · 0.50
bufMethod · 0.45
handleEventMethod · 0.45
freeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected