Message module over Event.pm

[email protected] (Gaal Yahas)
Newsgroups perl.loop
Message-ID <[email protected]>
Hi,

Has anyone done work on writing a "transport" module for messages with
Event.pm? I mean something along the lines of Sriram Srinivasan's
Msg.pm [1], but using Event's event loop rather than one of it's own.
The nice thing about such a module is that it handles reassembly of
possibly fragmented messages on its own, and leaves the application
with the need of only caring about the application-level protocol.

I see three variants of Msg.pm that could be useful:
- Length-prepended, arbitrary-size messages (the current Msg.pm)
- Line-based messages (very simple to use, even when the other end
  doesn't know it's talking with a special module)
- Fixed-length messages (with some sort of prior negotiation on message
  length)

If someone has a sort-of-a-port written, I'd love to have a copy. If not,
I'd like to help in writing one myself. But I want suggestions on how to
do it: should this be part of the Event kit, or a statndalone module that
merely depends on Event? Any particular issues I should have in mind when
writing this?


Thanks in advance,
Gaal

[1] Described in his book, _Advanced Perl Programming_. O'Reilly, 1997.
    Module available via CPAN or ftp.ora.com .

-- 
believing is seeing
[email protected]
http://www.forum2.org/gaal/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.