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

Function nw_psnet_buffer_init

networking/networking.cpp:1837–1852  ·  view source on GitHub ↗

MTS: only used in this file initialize the buffering system

Source from the content-addressed store, hash-verified

1835// MTS: only used in this file
1836// initialize the buffering system
1837void nw_psnet_buffer_init() {
1838 int idx;
1839
1840 // blast the buffer clean
1841 memset(Psnet_buffers, 0, sizeof(network_packet_buffer) * MAX_PACKET_BUFFERS);
1842
1843 // set all buffer sequence #'s to -1
1844 for (idx = 0; idx < MAX_PACKET_BUFFERS; idx++) {
1845 Psnet_buffers[idx].sequence_number = -1;
1846 }
1847
1848 // initialize the sequence #
1849 Psnet_seq_number = 0;
1850 Psnet_lowest_id = -1;
1851 Psnet_highest_id = -1;
1852}
1853
1854// MTS: only used in this file
1855// buffer a packet (maintain order!)

Callers 1

nw_InitSocketsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected