| Start |
|---|
| Simple Echo with aiohttp
|
| Wrapper Class with aiohttp
|
| Using Autobahn as a Websocket Factory The Autobahn package can be used for Python web socket server factories. Python Autobahn package documentation (opens new window) To install, typically one would simply use the terminal command (For Linux): (For Windows): Then, a simple echo server can be created in a Python script: In this example, a server is being created on the localhost (127.0.0.1) on port 9000. This is the listening IP and port. This is important information, as using this, you could identify your computer's LAN address and port forward from your modem, though whatever routers you have to the computer. Then, using google to investigate your WAN IP, you could design your website to send WebSocket messages to your WAN IP, on port 9000 (in this example). It is important that you port forward from your modem back, meaning that if you have routers daisy chained to the modem, enter into the modem's configuration settings, port forward from the modem to the connected router, and so forth until the final router your computer is connected to is having the information being received on modem port 9000 (in this example) forwarded to it. |
Read Article
https://develop.horje.com/learn/1434/reference