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

Method sendDisconnectPacket

Engine/source/sim/netInterface.cpp:462–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void NetInterface::sendDisconnectPacket(NetConnection *conn, const char *reason)
463{
464 Con::printf("Issuing Disconnect packet.");
465
466 // send a disconnect packet...
467 U32 connectSequence = conn->getSequence();
468
469 BitStream *out = BitStream::getPacketStream();
470 out->write(U8(Disconnect));
471 out->write(connectSequence);
472 out->writeString(reason);
473
474 BitStream::sendPacketStream(conn->getNetAddress());
475}
476
477void NetInterface::checkTimeouts()
478{

Callers

nothing calls this directly

Calls 5

printfFunction · 0.85
getNetAddressMethod · 0.80
getSequenceMethod · 0.45
writeMethod · 0.45
writeStringMethod · 0.45

Tested by

no test coverage detected