Tutorial for web chat server in Python

I am working on a home project for the Networking class, where we need to create a simple web chat server in C / C ++ or Python. I chose Python because I thought it would be a simpler language to implement the project. We can use any material that we find on the Internet, because it most likely will not have all the features that the project requires. In fact, the professor actually encouraged us to use material from the Internet, including textbooks. He does not test us on our ability to rather code our ability to implement network code, and whether we fully understand the processes involved.

The project must handle multiple clients and must support multiple browsers, chrome, firefox, etc. The user must be able to enter the IP address and port in the browser to connect. I just can’t find any materials for work. I found a bit in C, but nothing in Python.

Does anyone know any complete tutorials? There are many chats based on the client / server command, but without browser-based chats.

+5
source share
2 answers

You can watch TornadIO . Its implementation of python Socket.io , for Tornado , Tornado is an event-driven python web server.

https://github.com/MrJoes/tornadio2

http://www.tornadoweb.org/

Socket.io - - , - . , -, pub-sub. socket.io , , , : Websocket, Flashsocket, xhr polling, jsonp, htmlfile. , .

Tornadio2 - , Socket.io 0.7+. , 0,6. , TornadIO , , :

https://github.com/MrJoes/tornadio/tree/master/examples/chatroom

+3

All Articles