Granted there are people much more knowledgeable on this list who will probably respond shortly. I would though advise you to start "yaws -i" interactive mode so you can see the messages in the shell or post a part of your log with any error messages. I doubt it that the connection simply fails unless yaws fails to start or is not listening on 7000 at all barring those two you should get a message I'd think.

By default there is a cert for https I'm not sure about wss though. There is also a create your cert script.

On 09/21/2011 09:23 AM, Ferenc Vehmann wrote:

I've been playing around with yaws's websocket and using the documentation and the examples, I've managed to put together (mostly copy/paste) a working echo server with websocket:

However, I've bumped into some obstacles/confusions after that.

1) I've tried to start up the websocket in active mode. 
http://yaws.hyber.org/websockets.yaws suggest that in order to start websocket in active mode,  Out/1 should return  {websocket, OwnerPid, active}. However it didn't work even though ok was sent to OwnerPid by yaws.
yaws_api:websocket_setopts(WebSocket, [{active, true}]) was still needed.

2)  When using secure websocket ie: wss://localhost:7000/ the connection fails. 
Do I need to set up SSL in the configuration of the embedded yaws as well? 
Or something else?

Could you please let me know what's done wrong?
yaws-1.91.tar.gz from http://yaws.hyber.org/download/ is used.
Chrome 13.0.782.220 is used. (I saw in the archive that Chrome 14 has also some issues).

Not related to websocket, but I wanted to mention that compiling yaws from git doesn't work on OSX (Snow Leopard 10.6.6).
After autoconf ./configure would fail. It seemed that the EOL being in DOS format in the scripts was the problem.
After that ./configure worked but make failed.Granted there are people much knowledgeable
Then dos2unix scritps/* helped for make to go further but failed again.
yaws_generated.erl didn't contain modue definition. (empty file)
after the rm src/yaws_generated.erl, make worked.

Getting directly the tar.gz, ./configure && make works just fine. 

Kind Regards,

------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________ Erlyaws-list mailing list Erlyaws-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/erlyaws-list