MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / cleanReceiver

Method cleanReceiver

libapp2sys/src/main/cpp/udp.h:253–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 }
252
253 int cleanReceiver(Receiver *rs) {
254 if (!rs) {
255 return 0;
256 }
257 m_mapReceiver.erase(sockaddrToint64(rs->fromaddr));
258 for (std::map<int64_t, std::pair<uint32_t, uint8_t *> *>::iterator it = rs->sessionMap.begin(); it != rs->sessionMap.end(); it++) {
259 std::pair<uint32_t, uint8_t *> *p = (*it).second;
260 delete[] p->second;
261 delete p;
262 }
263 delete rs;
264 return 1;
265 }
266
267 // #lizard forgives
268 int processReceive() {

Callers

nothing calls this directly

Calls 4

sockaddrToint64Function · 0.85
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected