From: Nicolas George on
Rainer Weikusat wrote in message <87bpasfcqd.fsf(a)fever.mssgmbh.com>:
> The original topic happened to be 'network protocols'. Network
> protocols usually don't employ 'arbitrarily large' records

Like HTTP?
From: Rick Jones on
Nicolas George <nicolas$george(a)salle-s.org> wrote:
> Fortunately, the days where network protocols were directly
> connected to a terminal ended a good decade ago.

Speaking as a member of the Luddite Lunatic Fringe I will speak-out in
defense of protocols that a human can (attempt to) emulate via a dumb
terminal (emulator) and telnet :) But then again, I'd probably prefer
mnemonic memory circuits made from stone knives and bear skins.

rick jones
--
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
From: David Schwartz on
On Jun 30, 6:05 am, arnuld <sunr...(a)invalid.address> wrote:

> Yes, the server already sends data in that format. Its sends Content-
> Length: N  in the sending text.
>
> Problem is how can I be sure that particular length of data will arrive
> in recv(). It can come in any of these partial recv()s
>
> 1st recv(): Content-L
> 2nd recv(): ength: 1345
>
> 1st recv(): Conte
> 2nd recv(): -Length: 1234
>
> 1st recv(): Content-Length:
> 2nd recv():  1234
>
> 1st recv(): Content-Leng
> 2nd recv(): th: 1234

You actually have to implement the protocol. Kind of like this:

1) Call 'recv'.
2) Do I have enough data to process? If not, go to step 1.
3) Process the data I can process.
4) Go to step 1.

If you look at the protocol specification, it will tell you when you
have enough data to process for any given state. For example, in the
"waiting for headers" state of HTTP, you have enough data to process
when you receive a properly-terminated line. So check your 'recv' for
line terminators. If you got one, you have at least one line to
process. If not, call 'recv' again.

DS
From: John Gordon on
In <4c2bbb28$0$10436$426a74cc(a)news.free.fr> Nicolas George <nicolas$george(a)salle-s.org> writes:

> Rainer Weikusat wrote in message <87bpasfcqd.fsf(a)fever.mssgmbh.com>:
> > The original topic happened to be 'network protocols'. Network
> > protocols usually don't employ 'arbitrarily large' records

> Like HTTP?

HTTP is an application-layer protocol, not a network-layer protocol.

--
John Gordon A is for Amy, who fell down the stairs
gordon(a)panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

From: Nicolas George on
John Gordon wrote in message <i0h9ig$72t$1(a)reader1.panix.com>:
> HTTP is an application-layer protocol, not a network-layer protocol.

Which was what everything was about.