   Linux/Tcp Question
  As you may know, I'm using a three-tier architecture:C++ Middleware Writer (CMW) -- a serviceC++ Middleware Writer Ambassador (CMWA)-- a service"direct" program  -- runs once and exitsI'm testing some error handling functionality in the CMWA if the CMW crashes.  I've added a sleep to my version of the CMW so that it delays the first user request by a minute so I have time to start one or more instances of the direct program and kill the CMW before the sleep ends.   If there's just one instance of the direct program running, things  seems to work as expected.  But when I have two instances of direct, rather than a read() returning zero, it returns a negative value and ernno is ECONNRESET.  I'm running all of the processes on a machine running Fedora 13.  Does anyone know why the behaviour is different between the two cases?   When I get a zero return I throw an "eof" exception.  I'm wondering if I should check for the ECONNRESET value and also throw an eof exception in that case.  Thanks in advance.Brian WoodEbenezer Enterpriseshttp://webEbenezer.net
  Could you write a sequence list of events?0) process A starts1) process A calls bind() on port X and listen() and accept()2) process A returns from accept()3) process B starts4) process B calls bind() on port Y and listen() and accept()5) process C starts...I don't understand what the actual problem is from your description.   ;I don't understand what the actual problem is from your description.Sorry for my not so clear initial post.  I've been thinking about it a little more and have one idea.  When I just run one instance of the direct program, all of the data from the user's request is delivered via tcp to the CMW by the time it hits the sleep.  But when I run two instances, there's data (from the second request) that hasn't been delivered from tcp to the CMW before I kill the CMW. I guess this may have something to do with the difference I'm noticing.   