On 01 Feb 2015, at 15:30, Luc Fabresse <luc.fabresse@gmail.com> wrote:
Hi all,
Raining sunday ;-)
<ChatApp.png>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "In Pharo 3.0" Gofer it smalltalkhubUser: 'LucFabresse' project: 'Grimoire'; package: 'ChatApp'; load.
ChatApplication startLocalExample. ChatApplication stopLocalExample ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This a 1st draft version of a Chat Application that works. It is implemented in plain Socket with an ad hoc text protocol.
a *lot* should be improved, done or added:
- write tests (it is always a pain to write for client/server apps so here I skip them :-() - ensure that everything is correctly destroyed/cleaned (processes, sockets, streams, ...). it seems but... needs testing - refactor to use SocketStream? - better modularization of commands - another implementation using Zinc but it would imply using HTTP
Nice hack, luc. I would use WebSockets. Here is a live example http://websocket.stfx.eu:9999/ws-chatroom-client The implementation is part of Zinc-WebSockets. It is just 1 class: ZnWebSocketChatHandler.
Enjoy,
Luc