Supporting websockets through eventlet's wsgi server #774
adamlwgriffiths
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've managed to get python-socketio / flask-socketio working via the eventlet server and some monkey patching.
I've created a Gist with a self-contained demo of it.
What it boils down to is changing how
webview.serving.get_wsgi_server
wraps the provided function.I think we could change how pywebview detects/runs the backend server to make this a better supported option.
Perhaps the
get_wsgi_server
should take an optional function that does the wrapping for you.Something like:
The issue is when calling
webview.create_window('Title', my_run_function)
it will match the existingif callable(url)
check inwebview.serving.resolve_url
.So I suspect you may need to add another parameter, say
run_func
to this function, and pass both toget_wsgi_server
.Ie.
Alternatively, we could look to change the check of the
app
variable inresolve_url
.Beta Was this translation helpful? Give feedback.
All reactions