Hi,
Today I implemented two simple demos to show what is possible using Zinc WebSockets.
1. a simple chatroom
- each client opens a websocket to the chatroom service running on the server
- the server keeps track of all connected client web sockets
- when a message comes in from any client it is distributed to all clients
- each client shows all incoming messages
2. a simple, continously updated status view
- a client connects and listens for incoming messages containing a status report
- the server streams status reports to each connected client each second
- in the web browser you get to see the Smalltalk image's clock, memory and process stats
I made a 5 minute (silent ;-) movie showing 3 different browsers talking to one Pharo Smalltalk 2.0 image running a Zn server.
Faster, but lower quality:
http://youtu.be/CANkfSUbZIkPixel perfect quality, but 45Mb:
https://dl.dropbox.com/u/16235440/Zinc-WebSockets-Demo-20120907.movThe code can be found in
http://mc.stfx.eu/ZincHTTPComponentspackages
Zinc-WebSockets-Core and Zinc-WebSockets-Tests
best update all of Zn. Only tested on 2.0, but it should work on 1.4.
This is still a work-in-progress. There are code comments but high level documentation is still missing.
I am looking for adventureous testers though.
Sven
--
Sven Van Caekenberghe
http://stfx.euSmalltalk is the Red Pill