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

Function nw_CheckReliableSocket

networking/networking.cpp:1732–1749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1730}
1731
1732int nw_CheckReliableSocket(int socknum) {
1733 // Checks to see if a socket is connected or not.
1734 if (Use_DirectPlay) {
1735 return true;
1736 }
1737 if (socknum >= MAXRELIABLESOCKETS) {
1738 mprintf(0, "Invalid socket id passed to nw_CheckReliableSocket() -- %d\n", socknum);
1739 return 0;
1740 }
1741 switch (reliable_sockets[socknum].status) {
1742 case RNF_UNUSED:
1743 case RNF_BROKEN:
1744 case RNF_DISCONNECTED:
1745 return 0;
1746 default:
1747 return 1;
1748 }
1749}
1750
1751// MTS: only used in this file.
1752int nw_PingCompare(const void *arg1, const void *arg2) {

Callers 2

ServerTimedOutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected