I'm trying to get the YAWS websocket example from here running on my local. It's a basic ws-based echo server.
I have
localhost:8080
(direct from the Debian repos; no conf changes except pointing it to a new root directory)<erl>
tags saved as websockets_example_endpoint.yaws
index.yaws
(I literally copy/pasted the view-source for it, saved it as that file and pointed the socket request at localhost:8080
rather than yaws.hyber.org
).When I visit localhost:8080/websockets_example_endpoint.yaws
in-browser, it displays the text "You're not a web sockets client! Go away!", as expected. When I visit localhost:8080
, it points me to the javascript enabled form, but the "Connect" button does nothing when clicked. If I leave index.yaws
pointed at yaws.hyber.org
instead of localhost:8080
, the echo server connects and works exactly as expected.
Can anyone give me a hint as to what I'm doing wrong (or alternatively, point me to source for a working example)?
There is a gitbub project, I've created:
https://github.com/f3r3nc/yaws-web-chat/
This is also an example for embedding yaws and extended with group chat.
Note, that the standard of WebSocket is under development thus yaws and the browser should support the same WS version in order to work correctly.
yaws 1.91 works with Safari Version 5.1.1 (6534.51.22) but does not with Chrome (15.0.874.102) and probably not with (14.x).