Hi ... I've been trying to use for a couple of days finite state filters in my app.  I'm currently developing a Middleware Server for communicating two parties through a common data stream.  I'm using the finite_state_filter concept to detect the specific segments I'm interested in and decoupling them from the stream.  I wrote to this specific list because the only example provided by Boost on using them are the test suites.  There's no visible example of a main function for example using these filters and the author wrote at the end:  "I'll leave it as an exercise to discover how it works."

I managed to extract these lines to test them in my app:

        io::stream_buffer<io::file_sink> buf("log.txt");
        ostream                     out(&buf);
        string dest;
       
        comments.push_back( 0xa3 );
        comments.push_back( 0xa3 );
        comments.push_back( 0xa3 );
        comments.push_back( 0x72 );
        comments.push_back( 0x59 );
        comments.push_back( 0x2b );
        io::array_source src( comments.data(), comments.data() + comments.size() );
        io::copy( src, io::compose( uncommenting_filter(), blocking_sink( dest )));

However I'm interested in a more direct approach using sinks .  Something like:

data >> sink;

Where the sink has the filter already, or something of the sort. 

Can anyone help me ?? Thanks in advance ...