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

Method shutdown

Engine/source/platform/platformNet.cpp:574–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574void Net::shutdown()
575{
576 Process::remove(&Net::process);
577
578#ifdef TORQUE_NET_CURL
579 HTTPObject::shutdown();
580#endif
581
582 while (gPolledSockets.size() > 0)
583 {
584 if (gPolledSockets[0] == NULL)
585 gPolledSockets.erase(gPolledSockets.begin());
586 else
587 closeConnectTo(gPolledSockets[0]->handleFd);
588 }
589
590 closePort();
591 PlatformNetState::initCount--;
592
593 // Destroy event handlers
594 delete smConnectionNotify;
595 delete smConnectionAccept;
596 delete smConnectionReceive;
597 delete smPacketReceive;
598
599#if defined(TORQUE_USE_WINSOCK)
600 if(!PlatformNetState::initCount)
601 {
602 WSACleanup();
603 }
604#endif
605}
606
607// ipv4 version of name routines
608

Callers

nothing calls this directly

Calls 4

shutdownFunction · 0.50
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected