Mojo::UserAgent is a great websocket client. See
https://metacpan.org/pod/Mojolicious::Guides::Cookbook#WebSockets, and for
the server
https://metacpan.org/pod/Mojolicious::Guides::Cookbook#WebSocket-web-service
.

-Dan

On Mon, May 18, 2020 at 7:47 PM Miguel Manso <mma...@gmail.com> wrote:

> Hi there,
>
> Ive a Perl client that fetched some data every 3 seconds and post it to an
> API. Both client and server are written using mojo. Client uses
> Mojo::UserAgent to post JSON and server is a Mojolicious app being served
> with hypnotoad.
>
> I can have dozens of these clients which mean that each of them will be
> posting data and receiving from the server every 3 secs. I can easily do
> this using basic post calls but I wonder if there is a better way to
> achieve the same? Something like keeping connections opened for a period of
> time while sending and receiving data through the same connection?
>
> Ive seen websockets info but it seems it’s allways oriented to the client
> being in JavaScript.
>
> Any thoughts on the subject?
>
> Thanks in advance.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojolicious/127f7769-222c-4e76-80bf-af36df28a5e0%40googlegroups.com
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojolicious/CABMkAVU4OL2D6j8hmXpPwTif-5KW2WTDeeF2Enczmizod0Q6uQ%40mail.gmail.com.

Reply via email to