Discussion:
ERROR_SEM_TIMEOUT and ConnectEx
(too old to reply)
Bobofet
2010-03-19 17:09:29 UTC
Permalink
Raw Message
I've seen questions about this issue in the past but no clear
explanation. I have created a client app that attempts to probe a
number of IP addresses on a subnet (proof of concept for a discovery
and identification app).

A number of the requests succeed however after a time the remaining
connects fail with ERROR_SEM_TIMEOUT...

Are there any limitations on the number of sockets you can associate
with the IOCP vs. say the number of threads? Number of handles etc?
Bobofet
2010-04-19 12:56:32 UTC
Permalink
Raw Message
Post by Bobofet
I've seen questions about this issue in the past but no clear
explanation. I have created a client  app that attempts to probe a
number of IP addresses on a subnet (proof of concept for a discovery
and identification app).
A number of the requests succeed however after a time the remaining
connects fail with ERROR_SEM_TIMEOUT...
Are there any limitations on the number of sockets you can associate
with the IOCP vs. say the number of threads? Number of handles etc?
I found the error in my code. I was not resetting the overlapped event
after the IOCP packet was received. I missed a call to
WSAGetOverlappedResult. Internally I suspect the IOCP is waiting for
the event that it set in overlapped structure to be reset by the
handler; and timing out if that doesn't happen...

Loading...