0

I’m trying to learn sockjs for a small university project.

I’ve a local server (with typical LAMP configuration), my goal is writing a python script (running on my local server) that is able to send data to client browser in order to update a text information.

Sockjs was seemed to me the best solution (tornado-sockjs for python server). I read the tutorial examples (https://github.com/mrjoes/sockjs-tornado/tree/master/examples) but I’ve difficult to understand the basic functions.

It would be very useful to understand an example code. An example could be:

A python-server script generates a random number each 5 seconds and send this number to client. In webpage there is a definite element to update this value. In the same webpage there is a button to send a text message to python server. When python server received this message, print it in the server console.

Thank you in advance for your help.

I hope that this post will be useful to other people.

  • 1
    You probably need to re-read the tutorial couple of times and try the examples by yourself. Note that we are all like you, there is no stackgod. – randominstanceOfLivingThing Nov 17 '16 at 17:18
  • Stack Overflow isn't for teaching how to code. Posts here are for specific problems that you encounter while coding. There are lot's of manuals and docs online that will teach you how to use some of the methods in that tutorial. – Sub 6 Resources Nov 17 '16 at 17:24
  • Thanks fo your reply. –  Nov 18 '16 at 08:13

0 Answers0