Re: CSocket stops receiving

Tech-Archive recommends: Fix windows errors by optimizing your registry



<SKolchurin@xxxxxxxxx> wrote in message
news:1186426641.904966.215290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a problem which I am finding myself unable to figure out.

I have a fairly simple CSocket-derived class, which does not much
beyond overriding OnReceive so that it saves all the received buffer,
and then calling a function of a Pointer to a thread class of mine,
which does what it will with the buffer.

At the moment I have a server and a client, both of which have a
thread for receiving and a thread for sending through these sockets.
The general communication type is thus - client sends a request,
server processes and sends some sort of a reply. The messages to be
sent in-process are delivered through inter-thread messaging.

The problems occurs mainly while debugging, but it can happen while
just running the applications - at some point, if a number of request
are "fired" rapidly, the connection get messed up in a rather odd way:

Clients sends successfully, then Server receives, does it's
processing, goes on to send a reply, the send operation goes without
errors, and yet the other side never receives the message. I've traced
all the receive calls on my socket class, and not once there was an
error.
So basically, everything indicates that the connection is alive, and
yet it never goes through in one direction.

The messages are of varied sizes, but when in debug, 2 140-bytes
requests and 160-bytes replies kill the communication.


In your OnReceive handler, so you call Receive() more than once? Calling
Receive more than exactly once in the OnReceive handler can cause loss of
future FD_READ notifications, leading to the symptoms you are seeing.


.



Relevant Pages

  • Re: breaking the model
    ... > The forms data then is in the Request object. ... HTTP Request; in this case, the form POST Request from the Page. ... client and server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Resolving record with enumerated type
    ... In a CPU BFM package, ... because data goes in two directions (request from the ... from the server to the client), you'll need some way to orchestrate ...
    (comp.lang.vhdl)
  • Re: NadaNet file server coming soon...
    ... Applesoft BASIC running under ProDOS, in less than 300 lines, ... After each command is completed by the server, ... client the result code, the AUX TYPE, ... forgoes queueing (since one client can't have more than one request ...
    (comp.sys.apple2)
  • Re: Kerberos with Windows Integrated authentication
    ... behaviour if your Web server is in the client broweser's Internet zone. ... referencing it by computer name rather than FQDN), the browser will request ... Obviously, if you want to use Kerberos for authentication, you will either ...
    (microsoft.public.windows.server.security)
  • Re: Performance Issue with Runtime Image
    ... >> the client, closes the connection, then dies. ... request before even accepting the next incoming connection. ... The client program is unaffected so presumably the server is ...
    (comp.lang.smalltalk.dolphin)