Boost logo

Boost Users :

From: Stephen Webb (swebb75ky_at_[hidden])
Date: 2006-05-17 18:54:40

I don't really have my head around the Boost IO filter architecture yet, but
I have managed to get a very basic filter working. I'm having some trouble
with end-of-input issues. I think what I'm trying to do comes up
frequently, so hopefully this will be a straightforward answer...

What I'm trying to do is write a filter that takes in input one character at
a time (for simplicity -- for now), and outputs encrypted characters. The
block size is 4 bytes, so every 4 characters I can encrypt, and then spit
out the result. If I hit the end of input, then I want to pad the
plaintext, encrypt and output the final block. My trouble is knowing when
the end-of-input has arrived. Is there a well defined way that my output
filter is notified of a close event or something similar? I did see close
functions defined in the example filters, but mine isn't getting called. I
tried to look at the base64 encode/decode headers (which would have to deal
with the same issue) but I couldn't really follow it.

Any help is appreciated.



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