On 11/2/2026 6:42 PM, Charlie Gibbs wrote:
> On 2026-11-02, Chris M. Thomasson <chri…@gmail.com> wrote: >
>> On 11/1/2026 11:40 AM, Charlie Gibbs wrote: >>
>>> I was already setting the socket to non-blocking before calling >>> connect() - and yet there were times when the API blocked anyway. >>> I never did figure out why, and we had a customer getting impatient, >>> so I just spun off another thread and moved on to other things.
> > Ah, but then we come to that critical clause: > > Note This function is a Microsoft-specific extension to the Windows Sockets specification. > > Yes, one more attempt to close the open socket model with > Microsoft proprietary extensions. My code has to run under > Linux as well. Opening the socket in a separate thread is > guaranteed to avoid hangs, regardless of operating system. >
Well, on Linux we have aio or io_uring. The latter is more low level than the Windows IOCP.