MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / nw_RegisterCallback

Function nw_RegisterCallback

networking/networking.cpp:2303–2315  ·  view source on GitHub ↗

Register the networking library to call your function back When data containing your ID is found Returns non-zero if succesfull, Zero if this ID is already registered

Source from the content-addressed store, hash-verified

2301// When data containing your ID is found
2302// Returns non-zero if succesfull, Zero if this ID is already registered
2303int nw_RegisterCallback(NetworkReceiveCallback nfp, uint8_t id) {
2304 ASSERT(id < 16);
2305
2306 // rcg06212000 this happens all the time; let it slide.
2307 // if(Netcallbacks[id])
2308 //{
2309 // mprintf(0,"Trying to reregister a callback!\n");
2310 // Int3(); // Get Kevin!
2311 //}
2312
2313 Netcallbacks[id] = nfp;
2314 return 0;
2315}
2316
2317NetworkReceiveCallback nw_UnRegisterCallback(uint8_t id) {
2318 NetworkReceiveCallback nfp;

Callers 2

nw_InitSocketsFunction · 0.85
nw_InitReliableSocketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected