Python combines HTTP and WebSocketServer with SSL support
Python HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
ExampleWSServer.py
HTTPWebSocketsHandler.py
LICENSE
README.md
index.html

README.md

httpwebsockethandler

Python combines HTTP and WebSocketServer with SSL support

##command line options

#assume ExampleWSServer.py and HTTPWebSocketsHandler.py are in the current directory
nohup python ExampleWSServer.py 8000 secure username:mysecret >>ws.log&

This uses SSL/https. Change username:mysecret in a username:password chosen by yourself. The websserver uses port 8000 by default, and can be changed by an optional parameter:

nohup python ExampleWSServer.py 8001 secure username:mysecret >>ws.log&

Providing a user:password is optional, as well as using SSL/https. When the website is only accessible within your LAN, then the server can be used as plain http, by omitting the secure parameter. The following parameter formats are valid:

nohup python ExampleWSServer.py 8001 secure user:password >>ws.log&

#no username and password requested
nohup python ExampleWSServer.py 8000 secure >>ws.log&

#plain http, with optional port
nohup python ExampleWSServer.py 8002 >>ws.log&

#plain http, default port 8000
nohup python ExampleWSServer.py >>ws.log&