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

Function nw_Send

networking/networking.cpp:913–923  ·  view source on GitHub ↗

Sends data on an unreliable socket

Source from the content-addressed store, hash-verified

911
912// Sends data on an unreliable socket
913int nw_Send(network_address *who_to, void *data, int len, int flags) {
914 if (len == 0) {
915 mprintf(0, "Attempting to send 0 byte network packet in nw_Send()\n");
916 Int3();
917 }
918 if (NetDebugFile) {
919 uint8_t *ptr = (uint8_t *)data;
920 cfprintf(NetDebugFile, "nw_Send packet of type %d at %f seconds.\n", ptr[0], timer_GetTime());
921 }
922 return nw_SendWithID(NWT_UNRELIABLE, (uint8_t *)data, len, who_to);
923}
924
925// MTS: only used in this file?
926void nw_HandleUnreliableData(uint8_t *data, int len, network_address *from_addr) {

Callers 15

MultiDoAskToJoinFunction · 0.85
MultiDoGetGameInfoFunction · 0.85
MultiDoGetPXOGameInfoFunction · 0.85
GetServerGameTimeFunction · 0.85
MultiDoGameTimeReqFunction · 0.85
MultiSendWeaponsLoadFunction · 0.85
MultiSendVisiblePlayersFunction · 0.85
MultiSendFullPacketFunction · 0.85
MultiSendGreetingsFunction · 0.85
MultiSendPingFunction · 0.85
MultiDoPingFunction · 0.85
MultiSendRequestToFireFunction · 0.85

Calls 2

cfprintfFunction · 0.85
nw_SendWithIDFunction · 0.85

Tested by

no test coverage detected