* Initializes the network core (as that is needed for some platforms * @return true if the core has been initialized, false otherwise */
| 22 | * @return true if the core has been initialized, false otherwise |
| 23 | */ |
| 24 | bool 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 |