0

I am seeing strange behavior while using libwebsocket. As long as I keep the total number of simultaneous incoming websockets under 64 it works perfectly.

However the moment there is one more incoming request "WSAWaitForMultipleEvents" returns with WSA_WAIT_FAILED and GetLastError reports the error as 87.

my callback simply returns 0.

  • `GetLastError` or `WSAGetLastError`? Those two fetches different error codes. – Some programmer dude Oct 12 '15 at 11:53
  • Oh, and checking an [error code reference](https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381%28v=vs.85%29.aspx) might help a little, or a [Windows socket error reference](https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668%28v=vs.85%29.aspx) (for `WSAGetLastError`). – Some programmer dude Oct 12 '15 at 11:57
  • Both of them return the same error. "The parameter is incorrect. " – Bhaskar Priya Oct 12 '15 at 11:58
  • Then you probably pass an unexpected argument? Can you show some code please? And have you tried to step through the code with a debugger, to see what values you actually pass to the function? – Some programmer dude Oct 12 '15 at 12:13
  • Oh, and have you checked that `WSA_MAXIMUM_WAIT_EVENTS` isn't `64`? (as [`WSAWaitForMultipleEvents`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms742219%28v=vs.85%29.aspx) can't handle more events than that). – Some programmer dude Oct 12 '15 at 12:14
  • Whoops, WSA_MAXIMUM_WAIT_EVENTS is 64. – Bhaskar Priya Oct 12 '15 at 16:48

0 Answers0