[erlang-questions] Server Sent Event for Specific Client in YAWS server

Steve Vinoski vinoski@REDACTED
Thu Dec 14 14:57:58 CET 2017


Note that you might be better off sending Yaws questions to the Yaws
mailing list (https://sourceforge.net/projects/erlyaws/lists/erlyaws-list).

On Thu, Dec 14, 2017 at 6:26 AM, Mazhar <mohammedmazharuddin@REDACTED> wrote:

> Hello all,
>
>         Is there any way to make my SSE(sever sent events) handler send
> the message to a specific client and to a specific page,
>
>             I have gone through the SSE and understood that the server is
> sending the events to all the connected clients and the event is accessible
> in every page, and we are just handling the event in javascript. in short
> all the clients are receiving the events sent by the server.
>

I'm not sure I understand what you mean by the event being sent to all
connected clients. Events are sent on specific client connections. Perhaps
you're saying that your server-side code for a particular resource is going
into SSE mode regardless of how a client accesses that resource?

                Is there any way to overcome this? is there any better way
> to work with SSE? my requirement here is to query some external node and
> send the data to the client and i don't want all the clients to be
> receiving that data and also i want that data to be received only when the
> client is accessing a specific page.
>
> Your earliest response in this regard would be highly appreciated.
>

What you're asking for is entirely possible. I'd recommend either emailing
the Yaws mailing list or just emailing me directly to get more help. I'd
like to see the code you're currently using so I can get a better idea of
what directions to give you.

--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171214/9a721e26/attachment.htm>


More information about the erlang-questions mailing list