[Python]websocket的小型伺服器的簡例

安裝:

#git clone https://github.com/Pithikos/python-websocket-server
下載到目錄中

系統需要使用websocket模組:
sudo apt-get install python3-websocket

設定:

在server.py 裡改這一行,讓大家可以連線進來 WebsocketServer(PORT,”0.0.0.0″)

使用:

python3 server.py

 

程式位置:

https://github.com/Pithikos/python-websocket-server