Boost logo

Boost Users :

Subject: [Boost-users] Asio Protocol Decoder interfaces/templates
From: Rodrigo Madera (rodrigo.madera_at_[hidden])
Date: 2008-10-24 15:35:05

Hello all,

I was wondering if Boost Asio has any plans to have a structure such as
Apache MINA's xxxEncoder/xxxDecoder (which are for Java).

This kind of interface (for those who don't know them yet) allow you to
write code such as:

(Warning: very bad {and simplistic} example ahead)

class commands::echo : public message_decoder { somewhere("echo"); }
class commands::cls : public message_decoder { somewhere("cls"); }
class commands::exit : public message_decoder { somewhere("exit"); }

class my_protocol_decoder : public protocol_decoder {
    ctor() {

And that would give us a nice protocol decoder that we can plug into a
family of "decoding-friendly" classes.

Apache MINA does a great job doing this and maybe there is something that
can be extracted into Boost Asio.

Please tell me what you think or if I'm completely mad to want this or even
if I'm asking on the wrong place.

Thank you all!!
Rodrigo Madera =o)

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at