mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-19 22:25:59 +00:00
On macOS, calling connect() twice on a non-blocking socket does not allow distinguishing between successful and unsuccessful completion. poll() / WSAPoll() would be the correct cross-platform API to check for socket readiness, however on Windows before 10 2004 WSAPoll() never completes on a failed connect(). https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect documents that select() should be used instead. select() is an inferior choice on Unices, where descriptors (ints) in fd_set are limited to < FD_SETSIZE (1024).