benilla-re systems structs docs

s_selectStateJumpTable

global · net

Address
0x5bcf70 · 24 bytes, up to 0x5bcf87
Type
void *[6]
Meaning
Holds the case addresses of the select loop switch on connection state
Confidence
verified, proof one
Finding
net/threads#select-loop

Finding: Select loop in net: threads

0x5bcb00 builds the wake pipe, then repeats until the stop flag is set: it puts each listed connection into the read, write and exception sets by its state, selects, drains the wake pipe, and hands each connection with a ready socket to a worker. State 2 (connecting) goes in the write and exception sets; 3 (listening) in the read set; 5 (connected) in the read and exception sets, and in the write set only while its send queue is not empty or it asked for a write notice; 7 (closing) is counted and closed. The timeout is 30 seconds, or zero when a connection is closing or has events pending. The wake pipe is always in the read set.

The derivation is in the doc.