Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NET_HANDLER] Accept WebSocket connections in addition to normal TCP sockets #240

Open
levincent06 opened this issue Sep 23, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@levincent06
Copy link
Member

Dawn will be implementing a browser-based application, which will communicate with WebSockets instead of TCP sockets. We need to support browser-Dawn in addition to desktop app Dawn.

Here is an explanation for the difference between WebSockets and normal sockets: https://stackoverflow.com/q/4973622 (tl;dr WebSockets are built on top of TCP sockets)
Here is a small library that we can use: https://theldus.github.io/wsServer/

@levincent06 levincent06 added the enhancement New feature or request label Sep 23, 2021
@benliao1
Copy link
Collaborator

We may be rehashing the implementation of this. We will probably use the Python websocket library and start a new process, like websocket_server.py, which connects to localhost:RASPI_TCP_PORT on one end and a new websocket server on the other end and just ferries messages between the two. We might even be able to support both web browser Dawn and electron app Dawn simultaneously with this design.

@AVSurfer123
Copy link
Member

We will be using this library for Python https://websockets.readthedocs.io/en/stable/

@AVSurfer123 AVSurfer123 self-assigned this Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants