Boost logo

Boost :

From: Allan Kelly (allan_at_[hidden])
Date: 2001-12-20 12:28:46


From: Iain.Hanson_at_[hidden]
>
> Efficientcy is not the only reason that iostreams are not suitable for the
> loewest layer of a C++ networking library. They do not map well onto any
of the
> packet oriented protcols such as those build on UDP.
>
> ASCII protocols are far from in the majority either standardosed or
propriarty.
>
> IMHO efficiency, functionality, and type-saftey are all key issues in the
lowest
> layer of a network programming library.

I'm usually a Boost lurker but this one is close to my heart.

I understand and accept the arguments made about not basing a sockets layer
on streamio, streambuf and friends. I think Ross is right.

However, I can also appreciate the convenience of using sockets like any
other stream.

Would it not be possible to write two libraries?
- the first would be the non stream based, efficient library that Ross and
others would like to see.
- the second would build on top of this and provide the stream based i/o.

Yes, there would be a cost in terms of performance for the stream stuff but
this would be left user-developer to decide.
(If you are doing lots of text based i/o you probably prefer streams, and if
your doing a lot of text based i/o efficiency probably isn't your number on
concern.)

Just an idea.

allan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk