Re: TCP server stop receiving new connections
- From: Julián Rodríguez Bajo <julian.rodriguez@xxxxxxxxxx>
- Date: Fri, 13 Jul 2007 10:46:41 +0200
Alexander Nickolov escribió:
What do you do in your OnAccept handler? In particular,
do you try to accept multiple sockets? A test to try is to
reset the event mask of your listening socket each time you
exit its OnAccept handler.
Also, as a reality check - make sure your message loop
never gets stuck... E.g. when you break into the debugger,
almost always you should end up in the message loop.
Hi Alexander.
In OnAccept I just accept one incomming connection, since as documentation of WSAAsyncSelect says, FD_ACCEPT is posted after an accept call if there is another connection request available to accept. BTW, I have tested with a loop in OnAccept handler to accept all pending connection requests and behaviour did not change.
The problem is that OnAccept handler is not called for a long time (maybe 1, 2 or even 5 minutes).
OTOH, the first time I open the server socket, everything works fine, even if there are 50 clients running trying to connect to the server before I start the server. But after a shutdown/close/create/listen sequence the problem appears. Maybe has something to do with the Socket Notification Window creation/destruction by MFC framework?
Regards.
.
- Follow-Ups:
- Re: TCP server stop receiving new connections
- From: Alexander Nickolov
- Re: TCP server stop receiving new connections
- From: Ali
- Re: TCP server stop receiving new connections
- References:
- TCP server stop receiving new connections
- From: Julián Rodríguez Bajo
- Re: TCP server stop receiving new connections
- From: Ali
- Re: TCP server stop receiving new connections
- From: Julián Rodríguez Bajo
- Re: TCP server stop receiving new connections
- From: Ali
- Re: TCP server stop receiving new connections
- From: Julián Rodríguez Bajo
- Re: TCP server stop receiving new connections
- From: Julián Rodríguez Bajo
- Re: TCP server stop receiving new connections
- From: Alexander Nickolov
- TCP server stop receiving new connections
- Prev by Date: Re: What is better Blocking Sockets or Async?
- Next by Date: Re: TCP server stop receiving new connections
- Previous by thread: Re: TCP server stop receiving new connections
- Next by thread: Re: TCP server stop receiving new connections
- Index(es):
Relevant Pages
|