MCPcopy Create free account
hub / github.com/ddnet/ddnet / SendConnLoggingCommand

Method SendConnLoggingCommand

src/engine/server/server.cpp:1255–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1253
1254#ifdef CONF_FAMILY_UNIX
1255void CServer::SendConnLoggingCommand(CONN_LOGGING_CMD Cmd, const NETADDR *pAddr)
1256{
1257 if(!Config()->m_SvConnLoggingServer[0] || !m_ConnLoggingSocketCreated)
1258 return;
1259
1260 // pack the data and send it
1261 unsigned char aData[23] = {0};
1262 aData[0] = Cmd;
1263 mem_copy(&aData[1], &pAddr->type, 4);
1264 mem_copy(&aData[5], pAddr->ip, 16);
1265 mem_copy(&aData[21], &pAddr->port, 2);
1266
1267 net_unix_send(m_ConnLoggingSocket, &m_ConnLoggingDestAddr, aData, sizeof(aData));
1268}
1269#endif
1270
1271int CServer::DelClientCallback(int ClientId, const char *pReason, void *pUser)

Callers 3

NewClientCallbackMethod · 0.80
DelClientCallbackMethod · 0.80

Calls 3

mem_copyFunction · 0.85
net_unix_sendFunction · 0.85
ConfigFunction · 0.50

Tested by

no test coverage detected