I am writing an IMAP server using Kamaelia right now. According to the
IMAP protocol, most of the time I need to receive single lines
terminated by \r\n. Occasionally, the client declares a size and I
need to keep receiving until I have received <size> bytes.

I have put together a BufferedReceiver that can handle these two use
cases. It defaults to being a line receiver, but I can switch the mode
back and forth by sending a BufferUntil(value) to the receiver on its
control inbox.

I have put up the code at http://pastebin.com/m41eaf698. Could I get
any comments on style, appropriate usage of the Kamaelia components,
whether this is the right way to go about it, etc?

Thanks,

Van

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"kamaelia" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/kamaelia?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to