[mw-devel] MW3 r1387 - trunk/webclient

arthur at sucs.org arthur at sucs.org
Mon Sep 21 13:56:35 BST 2015

Author: arthur
Date: 2015-09-21 13:56:34 +0100 (Mon, 21 Sep 2015)
New Revision: 1387

quick explanation of how this works

Added: trunk/webclient/README
--- trunk/webclient/README	                        (rev 0)
+++ trunk/webclient/README	2015-09-21 12:56:34 UTC (rev 1387)
@@ -0,0 +1,24 @@
+This is the web client for milliways talker.
+It works by running a background task that connects to the server
+and appears as a standard client, buffering up messages until it is
+polled by the web interface.
+once you have the username & password (or existing sucssite token)
+you launch mwpoll, this authenticates the user, puts itself into
+the background, and gives you a socket address to communicate with it.
+the html code can then make ajax calls to poll.php, which will talk
+to mwpoll through the socket, retrieving any new messages that are
+waiting, if there are none it will pause for upto 60 seconds in a 
+"long poll". 
+all messages (or an empty list) are returned in json format
+when the user has a command or message to send, an ajax call is placed
+to send.php any immediate response from the command will be returned
+as a json message
+in the current implimentation most of the decoding of the json messages
+is handled by say.js in the browser

More information about the mw-devel mailing list