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

Method init

Engine/source/platform/platformNet.cpp:547–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547bool Net::init()
548{
549#if defined(TORQUE_USE_WINSOCK)
550 if(!PlatformNetState::initCount)
551 {
552 WSADATA stWSAData;
553 AssertISV( !WSAStartup( 0x0101, &stWSAData ), "Net::init - failed to init WinSock!" );
554
555 //logprintf("Winsock initialization %s", success ? "succeeded." : "failed!");
556 }
557#endif
558 PlatformNetState::initCount++;
559
560 smConnectionNotify = new ConnectionNotifyEvent();
561 smConnectionAccept = new ConnectionAcceptedEvent();
562 smConnectionReceive = new ConnectionReceiveEvent();
563 smPacketReceive = new PacketReceiveEvent();
564
565#ifdef TORQUE_NET_CURL
566 HTTPObject::init();
567#endif
568
569 Process::notify(&Net::process, PROCESS_NET_ORDER);
570
571 return(true);
572}
573
574void Net::shutdown()
575{

Callers

nothing calls this directly

Calls 1

initFunction · 0.50

Tested by

no test coverage detected