MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getServerOrClient

Function getServerOrClient

src/OpenLoco/src/Network/Network.cpp:30–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 static std::unique_ptr<NetworkClient> _client;
29
30 static NetworkBase* getServerOrClient()
31 {
32 switch (_mode)
33 {
34 case NetworkMode::server:
35 return _server.get();
36 case NetworkMode::client:
37 return _client.get();
38 default:
39 return nullptr;
40 }
41 }
42
43 void openServer()
44 {

Callers 2

updateFunction · 0.85
sendChatMessageFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected