W3C home > Mailing lists > Public > www-talk@w3.org > March to April 1996

Re: Receiving requests

From: Simon Spero <ses@tipper.oit.unc.edu>
Date: Sun, 24 Mar 1996 13:30:16 -0800 (PST)
To: Fabien Petitcolas <fapp2@hermes.cam.ac.uk>
Cc: "'www-talk@w3.org'" <www-talk@w3.org>
Message-Id: <Pine.SOL.3.91.960324132704.27765B-100000@chivalry>
On Sun, 24 Mar 1996, Fabien Petitcolas wrote:

> What is the most common way for receiving requests from a browser?
> I tried to use the following code, but the program stops in the loop.
> What's wrong in this way of doing?
> while ((nread = recv(socket, buffer, BUFFER_SIZE, 0))>0)

Typical Fenland community college student :-) 

The reason your code doesn't work is that you're trying to read 
everything up until the end of file, when you really only want to read 
until the end of the first line.


They say in  online country             So which side are you on boys
There is no middle way                  Which side are you on
You'll either be a Usenet man           Which side are you on boys
Or a thug for the CDA                   Which side are you on?
  National Union of Computer Operatives; Hackers, local 37   APL-CPIO
Received on Sunday, 24 March 1996 16:26:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:58 UTC