MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / MPConnection_FailConnect

Function MPConnection_FailConnect

src/Server.c:265–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static void MPConnection_FailConnect(cc_result result) {
266 static const cc_string reason = String_FromConst("You failed to connect to the server. It's probably down!");
267 cc_string msg; char msgBuffer[STRING_SIZE * 2];
268 String_InitArray(msg, msgBuffer);
269
270 if (result) {
271 String_Format3(&msg, "Error connecting to %s:%i: %e" _NL, &Server.Address, &Server.Port, &result);
272 Logger_Log(&msg);
273 }
274 MPConnection_Fail(&reason);
275}
276
277static void MPConnection_TickConnect(struct ScheduledTask* task) {
278 cc_bool writable;

Callers 2

MPConnection_TickConnectFunction · 0.85

Calls 3

String_Format3Function · 0.85
Logger_LogFunction · 0.85
MPConnection_FailFunction · 0.85

Tested by

no test coverage detected