MCPcopy Create free account
hub / github.com/amule-project/amule / OnPacketReceived

Method OnPacketReceived

src/ExternalConn.cpp:312–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311
312const CECPacket *CECServerSocket::OnPacketReceived(const CECPacket *packet, uint32 trueSize)
313{
314 packet->DebugPrint(true, trueSize);
315
316 const CECPacket *reply = NULL;
317
318 if (m_conn_state == CONN_FAILED) {
319 // Client didn't close the socket when authentication failed.
320 AddLogLineN(_("Client sent packet after authentication failed."));
321 CloseSocket();
322 }
323
324 if (m_conn_state != CONN_ESTABLISHED) {
325 // This is called twice:
326 // 1) send salt
327 // 2) verify password
328 reply = Authenticate(packet);
329 } else {
330 reply = ProcessRequest2(packet);
331 }
332 return reply;
333}
334
335
336void CECServerSocket::OnLost()

Callers

nothing calls this directly

Calls 1

DebugPrintMethod · 0.45

Tested by

no test coverage detected