[NNTP] CAPABILITIES problem!

Russ Allbery rra at stanford.edu
Wed Aug 3 10:15:10 PDT 2005


Charles Lindsey <chl at clerew.man.ac.uk> writes:

> Life is always simpler with strings of a known maximum length (no need
> to malloc space every time a new string is encountered). For simple
> keywords, intended primarily for internal protocol use, a fixed length
> is quite enough.

Having written a fair number of NNTP parsers at this point, I'm at a loss
to understand where someone would use a fixed-length buffer specifically
for keywords.

You already have the whole command in memory since you have to read it
from the network.  At that point, why would you copy the keyword into yet
another buffer instead of just parsing it in-place?

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the ietf-nntp mailing list