Re: Winsocks: 10038/WSAENOTSOCK after accept()



I'm not sure that INVALID_SOCKET was for listening socket, but for working
socket. OP need to check that obviously.
Arkady

"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:u9Ey2rj9HHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
Well, of course, but when your listening socket is closed
or doesn't exists altogether, there's no backlog, correct?
Besides, the size of the TCP 3-way handshake backlog
is unrelated to accept as it is called only after the connection
is established. It has effect on how many TCP clients can
be actively connecting simultaneously and is completely
isolated from the server code.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:OAIN8ij9HHA.4712@xxxxxxxxxxxxxxxxxxxxxxx
Backlog is property of the server's ( listening ) , not client socket
Arkady

"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:e5iySZj9HHA.484@xxxxxxxxxxxxxxxxxxxxxxx
I fail to see how this can relate to an invalid listening socket...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message
news:uIQAopb9HHA.5424@xxxxxxxxxxxxxxxxxxxxxxx
Check maybe that problem connected to backlog, only 5 allowered in
client Os (XP/Vista ) opposite to 200 in Server's Os
Arkady
"Moritz Armingeon" <armingeon@xxxxxxxxx> wrote in message
news:97f40$46e6fdf1$4d38fd17$15743@xxxxxxxxxxxxxxxxxx
Hello!

I'm running a webserver for a webservice. It's written in unmanaged
C++. On high a frequency of connections, maybe 20 per second, it
becomes unstable.
accept() on a new client socket returns INVALID_SOCKET and
WSAGetLastError() returns 10038.

With lower frequencies, the webserver stays stable though. What could
be the cause of such an bevavior? Maybe local socket limitations?
Netstat lists many sockets in state TIMED_WAIT.


Regards, Moritz











.



Relevant Pages

  • Re: Winsocks: 10038/WSAENOTSOCK after accept()
    ... Microsoft MVP, MCSD ... With lower frequencies, the webserver stays stable though. ... Maybe local socket limitations? ...
    (microsoft.public.win32.programmer.networks)
  • Re: URL filtering using LSP
    ... Microsoft MVP, MCSD ... E.g. in your WSPRecv implementation. ... mark the socket as readable and return your own response ... If you want to close the socket, ...
    (microsoft.public.win32.programmer.networks)
  • Re: How to correctly disconnect timeouted clients in IOCP server?
    ... then your last resort is to close the socket and open ... Alexander Nickolov ... Microsoft MVP, MCSD ...
    (microsoft.public.win32.programmer.networks)
  • Re: WSARecv call blocking when using overlapped I/O
    ... That's because Win9x doesn't feature overlapped I/O. ... Alexander Nickolov ... >> You need an overlapped socket for overlapped I/O. ... >> Microsoft MVP, MCSD ...
    (microsoft.public.win32.programmer.networks)
  • Re: Winsocks: 10038/WSAENOTSOCK after accept()
    ... the inbound socket descriptor, which in this case is the listening ... Microsoft MVP, MCSD ... client Os opposite to 200 in Server's Os ... the webserver stays stable though. ...
    (microsoft.public.win32.programmer.networks)