Hi,
I'm planning to write some TCP client (binary protocol) with Mojo::IOLoop.
I had some previous experience with AnyEvent::Handle and now I'm missing
more advanced API in Mojo.
Simple "on read" is fine but I desire some more easier to use, especially
with "regexp" and "getline" support, so I could write something like ie.:
$stream->on(
read => sub {
my ($stream, $chunk);
$stream->push_read(regex => qr/ .*? \x02 (.*?) \x03 /xs, sub {
my ($stream, $data) = @_;
warn "EMIUCP message: $data";
}
}
);
In such case I would like to get my complete EMIUCP message even if it was
sent in more than one TCP frame (more than one stream event). In other way,
ie. $stream->push_read(line => sub { ... }) would just read the stream
line-by-line.
Is something like this just ready or planned? I do not want to reinvent
wheel.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.