IOLoop Connections

53 views
Skip to first unread message

Brian Shaw

unread,
Jul 10, 2016, 3:22:40 PM7/10/16
to Mojolicious
  Is there a way to tell when a client has completed the initial connection to the server, as opposed to any other time in the life of the connection?
  With HTTP(S) you just sit and wait until the client says something like "GET /".
  I'm trying to write a mail server and the SMTP protocol specifies that the server, not the client, starts the conversation once the client connects.
  If there is some way outside of IOLoop to do this, I'm okay with changing directions.
  Thanks for any suggestions or code snippets.

Brian

s...@alexbyk.com

unread,
Jul 10, 2016, 5:46:06 PM7/10/16
to mojol...@googlegroups.com
You could use Mojo::IOLoop::Server; accept event.
https://metacpan.org/pod/Mojo::IOLoop::Server



--
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 mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Brian Shaw

unread,
Jul 12, 2016, 8:11:44 PM7/12/16
to Mojolicious
Thanks.  That worked well.  Do you know if there is a complete list of events?

Brian

Jan Henning Thorsen

unread,
Jul 27, 2016, 8:36:45 AM7/27/16
to Mojolicious
The list of events are right there in the documentation: https://metacpan.org/pod/Mojo::IOLoop::Server#EVENTS

Charlie Brady

unread,
Jul 29, 2016, 9:43:52 AM7/29/16
to Mojolicious

On Wed, 27 Jul 2016, Jan Henning Thorsen wrote:

> The list of events are right there in the
> documentation: https://metacpan.org/pod/Mojo::IOLoop::Server#EVENTS

So, that gives 'accept' (directly) and 'error' (from Mojo::EventEmitter).
Reply all
Reply to author
Forward
0 new messages