Skip to content

SevenW/httpwebsockethandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpwebsockethandler

Python combines HTTP and WebSocketServer with SSL support

In my plugwise-2-py repository a python3 version can be found.

##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&

About

Python combines HTTP and WebSocketServer with SSL support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published