3 ms·
Does this work in the face of state changing out from under the socket? I'm not super familiar with low level socket details but I'm thinking something like con
by diowldxiks 7mo ago
Does this work in the face of state changing out from under the socket? I'm not super familiar with low level socket details but I'm thinking something like connect returning EINPROGRESS and you not knowing if the connection has completed. It may complete, it may fail, but during that time this state machine is invalid I think. It seems like strict logical programming like this gets much harder in the face of mutable state changing out from under the program, but that can probably be worked around with enough effort.
- ngrislain 7mo agoYou are right, what I wrote is more of a PoC. It's valid for blocking sockets on the happy path.