Hi!

I changed the code, so it should run on an OpenACS installation, 
although the version I tried it with is rather old. For the demo, only 
the multicast is implemented with no back channel, as this is what we 
heavily use.

You can try it here with a modern browser which implements the websocket 
version >= 13:

Receive messages: http://www.dcon.at/test/websockets/ns_chan-html
Send messages: http://www.dcon.at/test/websockets/ws-send

Older versions are not supported, as the handshake did not follow the 
http standards and you'd have to change the protocol handling in 
AOLserver itself, which has already been discussed in this list.

Websockets server side code: 
http://www.dcon.at/test/websockets/websockets.zip

To send a message from the server to all subscribed clients of a certain 
channel:

set subscription "all"
set msg "Welcome to the beautiful world of websockets"
ws::multicast $subscription [ws::build_msg $msg]

Please notice, that we have to cycle through all connections in 
ws::receive, to get the messages from the clients. If we could do this 
event based, with registering scripts for channels, websockets on 
AOLserver would be perfect.

Wolfgang

-- 
digital concepts OG
Software & Design
Landstrasse 68 / 5. Stock
A - 4020 Linz

Büro:  +43 732 99711772
Mobil: +43 699 19971172


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
aolserver-talk mailing list
aolserver-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aolserver-talk

Reply via email to