Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Yaws and HTML5 Websocket

Guest
Posted: Thu Dec 17, 2009 9:06 pm Reply with quote
Guest
Hello all,

Does someone actually use yaws and the websocket feature introduced with HTML5 ?

Thank you












------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Thu Dec 17, 2009 9:38 pm Reply with quote
Guest
wde wrote:
> Hello all,
>
> Does someone actually use yaws and the websocket feature introduced with HTML5 ?
>


Not to my knowledge, thus excellent opportunity to be the first !! and publish.

/klacke

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
nesrait
Posted: Thu Dec 17, 2009 11:23 pm Reply with quote
User Joined: 02 May 2009 Posts: 33 Location: Portugal
Hi all,


Just uploaded a Web Sockets ewgi implementation that is working on Yaws, Mochiweb and Inets.
To use it just grab the last code from:
http://github.com/davide/ewgi
View user's profile Send private message
Guest
Posted: Fri Dec 18, 2009 6:12 am Reply with quote
Guest
ok, thank you
Guest
Posted: Fri Dec 18, 2009 2:18 pm Reply with quote
Guest
what about a new result type {websocket,Pid::pid(),Active::bool()} ?
nesrait
Posted: Fri Dec 18, 2009 2:26 pm Reply with quote
User Joined: 02 May 2009 Posts: 33 Location: Portugal
Hi again,

Both wde and me have stumbled in a strange behaviour: even after passing control over the socket to the new owner (I've checked that it succeeds in doing so) the Yaws process is still able to close the socket - taking away all the funin web socketing. :\

Additionally, I should notice that my ewgi code only seems to work on mochiweb, the same issue pops up on ewgi_yaws and ewgi_inets. In both cases, simply delaying the "killing" of the server process seems to be enough to have the web socket open/working.

My current assumption is that it is possible for another process that is not the socket owner to close it. Can anyone share some insights into this?

Now excuse me while I go fire my test monkey. Smile

Cheers,
Davide Smile

Post received from mailinglist
View user's profile Send private message
Guest
Posted: Fri Dec 18, 2009 2:31 pm Reply with quote
Guest
Your code seems good for me davide (but I'm not a guru)
Guest
Posted: Fri Dec 18, 2009 3:14 pm Reply with quote
Guest
2009/12/18 Davide Marqu
Guest
Posted: Fri Dec 18, 2009 3:27 pm Reply with quote
Guest
Maybe we could add the Origin header in the yaws:http_collect_headers/4
Guest
Posted: Fri Dec 18, 2009 3:29 pm Reply with quote
Guest
ok seems to work
nesrait
Posted: Fri Dec 18, 2009 3:30 pm Reply with quote
User Joined: 02 May 2009 Posts: 33 Location: Portugal
I just looked at the code and I suggest this:
case yaws:outh_get_doclose() of
View user's profile Send private message
Guest
Posted: Fri Dec 18, 2009 3:38 pm Reply with quote
Guest
seems better Smile
Guest
Posted: Fri Dec 18, 2009 3:48 pm Reply with quote
Guest
2009/12/18 Davide Marqu
Guest
Posted: Fri Dec 18, 2009 3:50 pm Reply with quote
Guest
2009/12/18 Steve Vinoski <vinoski@ieee.org (vinoski@ieee.org)>
Quote:


2009/12/18 Davide Marqu
nesrait
Posted: Fri Dec 18, 2009 3:54 pm Reply with quote
User Joined: 02 May 2009 Posts: 33 Location: Portugal
Quote:
Quote:

In that case, you could just return


{header, {connection, erase}}


in the same list where you return streamcontent_from_pid, which removes any Connection header from the reply headers and also sets doclose in the process registry to false.





Just to clarify, I will make the streamcontent_from_pid return value enforce this side-effect for the connection header and setting, but if you want it to work immediately you could put it in your code right now and it would still work even after I change the code.




Something like this?
handle_out_reply({websocket, _OwnerPid, _SocketMode}=Reply,
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 2
Goto page 1, 2  Next
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum