MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / handleDisconnect

Method handleDisconnect

Engine/source/sim/netInterface.cpp:401–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401void NetInterface::handleDisconnect(const NetAddress *address, BitStream *stream)
402{
403 NetConnection *conn = NetConnection::lookup(address);
404 if(!conn)
405 return;
406
407 U32 connectSequence;
408 char reason[256];
409
410 stream->read(&connectSequence);
411 stream->readString(reason);
412
413 if(conn->getSequence() != connectSequence)
414 return;
415
416 conn->onDisconnect(reason);
417 conn->deleteObject();
418}
419
420void NetInterface::handleInfoPacket(const NetAddress *address, U8 packetType, BitStream *stream)
421{

Callers

nothing calls this directly

Calls 6

lookupFunction · 0.85
readMethod · 0.45
readStringMethod · 0.45
getSequenceMethod · 0.45
onDisconnectMethod · 0.45
deleteObjectMethod · 0.45

Tested by

no test coverage detected