MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / NetworkCoreInitialize

Function NetworkCoreInitialize

src/network/core/core.cpp:24–39  ·  view source on GitHub ↗

* Initializes the network core (as that is needed for some platforms * @return true if the core has been initialized, false otherwise */

Source from the content-addressed store, hash-verified

22 * @return true if the core has been initialized, false otherwise
23 */
24bool NetworkCoreInitialize()
25{
26/* Let's load the network in windows */
27#ifdef _WIN32
28 {
29 WSADATA wsa;
30 Debug(net, 5, "Loading windows socket library");
31 if (WSAStartup(MAKEWORD(2, 0), &wsa) != 0) {
32 Debug(net, 0, "WSAStartup failed, network unavailable");
33 return false;
34 }
35 }
36#endif /* _WIN32 */
37
38 return true;
39}
40
41/**
42 * Shuts down the network core (as that is needed for some platforms

Callers 1

NetworkStartUpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected