Date: Sat, 16 Nov 1996 16:11:36 -0600 From: jlemon@americantv.com (Jonathan Lemon) To: scrappy@ki.net (Marc G. Fournier) Cc: hackers@FreeBSD.org Subject: Re: Hate to ask more about sockets...but... Message-ID: <199611162211.WAA05401@right.PCS> In-Reply-To: <Pine.NEB.3.95.961116144609.7019A-100000@quagmire.ki.net>; from Marc G. Fournier on Nov 16, 1996 15:13:04 -0500 References: <Pine.NEB.3.95.961116144609.7019A-100000@quagmire.ki.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> Great, this works...sort of. For some reason, the program reports that the > read completed correctly, with the exact number of bytes read as I wrote to > the socket, but I'm missing several lines out of the graphic when I view it. > (check out http://www.ki.net/~scrappy/test.html, if you want to see what I > mean by "missing several lines") > > If I change 'cnt' in the server to be 2 instead of 1, the graphic will come > out completely...as if, for some reason, the last read didn't get written to > the screen if it only 'scans' the file once. > > The other thing I found was weird was that if I changed the 'break' in > the client side to a 'continue', so that it continued to scan the input > socket for data (ie. await the next image to be send down the socket), I > lost even more data from the image. It sounds almost if your client is buffering it's output writes, and that you aren't flushing the buffer before the client exits. I cobbled up a quick client/server example with the above code, and it doesn't seem to have any problems transferring data back and forth. (e-mail me if you want the code). -- Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611162211.WAA05401>