|
Boost : |
From: Carlo Wood (carlo_at_[hidden])
Date: 2004-08-31 20:43:28
On Tue, Aug 31, 2004 at 06:41:36PM -0500, Larry Evans wrote:
> I haven't thought deeply about this, but could this message idea and
> stack of streambuf's be used to implement a part of the upper layers
> of the OSI model:
>
> http://www.geocities.com/SiliconValley/Monitor/3131/ne/osimodel.html
Well, the idea coming from my work on libcw ... one description of
libcw is "An Object Oriented C++ library for networking applications",
so yes - the whole idea has always been to be a general though efficient
method to deal with networking protocols (the top layer of OSI).
> ? For example, each layer would correspond to an element in the stack
> of streambufs, and each streambuf could have a state associated with it.
> For example, the state could be a complex fsm, as with TCP:
You lost me here. stack elements of streambufs are not related to
OSI layers (which even include the hardware?! A horse != cow).
Also, I talked about 'messages' (chunks of data) and not about stacked
streambufs; mulitple streambufs means copying of data and I am trying
to talk Jonathan out of that :p. Finally, a TCP statemachine is an
ISO layer lower - and a statemachine that would decode a specific
protocol would be a layer higher then my 'Message' objects.
> http://www.tcpipguide.com/free/t_TCPOperationalOverviewandtheTCPFiniteStateMachineF.htm
>
> In another application, indenting output to reflect code structure, the
> state could be a simple flag, bol (beginning-of-line), to indicate the
> next character output will be the first on the line, and a length, to
> indicate the width of the current margin. An example of a streambuf
> with such a simple state is:
>
> http://cvs.sourceforge.net/viewcvs.py/boost-sandbox/boost-sandbox/boost/io/filters/ofilter_leftmargin_adjustable.hpp?view=markup
There is no streambuf on that page.
-- Carlo Wood <carlo_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk