WSocket
Simple WSGI HTTP + Websocket Server, Framework, Middleware And App.
Note: I am a 16 years old student.I have no enough knowledge. So can anyone help me to develop this library?
Server
Server(WSGI) creates and listens at the HTTPsocket, dispatching the requests to a handler. WSGIRef server but uses threads to handle requests by using the ThreadingMixIn. This is useful to handle web browsers pre-opening sockets, on which Server would wait indefinitely. can used with any WSGI compatible web framework
Middleware
convert any WSGI compatible web framework to Websocket+HTTP framework using middleware. works with many WSGI compatible servers can used with any WSGI compatible web framework
Flask, Django, Pyramid, Bottle, ... supported
Handler
wsgiref.simple_server.WSGIRequestHandler like class named FixedHandler that always wrap WSGI app using Middleware.
changes from WSGIRequestHandler :
- Prevents reverse DNS lookups
- errorless logger
- use
ServerHandlerto make it WSGI
You can convert wsgiref to a websocket+HTTP server using this handler
ServerHandler
wsgiref.simple_server.ServerHandler(inherited from wsgiref.handlers.ServerHandler like handler named FixedServerHandler .
changes from ServerHandler :
- set HTTP version to
1.1because versions below1.1are not supported some clients like Firefox. - removed hop-by-hop headers checker because it raise errors on
UpgradeandConnectionheaders - check that all headers are strings
Framework
basic WSGI web application framework that uses Middleware.
- simple routes handler
- auto description to status code
- headers checker
- send data as soon as possible
- send strings, bytes, lists(even bytes and strings mixed) or files directly
- error catcher and error logger
works with many WSGI compatible servers
App
Event based app for websocket communication. this is app that uses Framework if not events handled by developer. this app works like demo(echo) app.
Features
all Middleware, Handler, Framework and App has following features.
- websocket sub protocol supported
- websocket message compression supported (works if client asks)
- receive and send pong and ping messages(with automatic pong sender)
- receive and send binary or text messages
- works for messages with or without mask
- closing messages supported
- auto and manual close
View Documentaion - https://wsocket.gitbook.io/ Report Bugs - https://github.com/Ksengine/WSocket/issues/new/
License
Code and documentation are available according to the MIT License (see LICENSE).
Release files for WSocket 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| WSocket-2.1.0.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| WSocket-2.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 27.5 kB
Release files / WSocket-2.1.0.tar.gz
| Download URL | WSocket-2.1.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8a66b714c558403fd5f1b5f2584c72a2804fee590014916a5e6566964a73601
|
|
BLAKE2b-256 checksum How to use checksums |
30f4cf572069caecbb7c05465a1a70a877e3ce40059be42535ecd0a637418540
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
|
Release files / WSocket-2.1.0-py2.py3-none-any.whl
| Download URL | WSocket-2.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ef3043ac63b4a620cae02674c925960095f963cf2c4b3c18ba37610b7b0f7d16
|
|
BLAKE2b-256 checksum How to use checksums |
da295e0c4a67f45d7cc4709e9dfceae171e341389ee9f1bb15692f4d81d2d4be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.16
|