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

Method sendDisconnectPacket

Engine/source/sim/netInterface.cpp:461–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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