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

Add: support client connections over WebSocket / HTTP #39

Merged
merged 1 commit into from Dec 15, 2020

Conversation

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 9, 2020

If on the / URL it is detected that this is in fact a WebSocket,
it will be upgraded and act like a TCP connection. The protocol
is expected to be "binary", and the exact same OpenTTD protocol
is used as with the TCP connection to the server.

Copy link
Member

@LordAro LordAro left a comment

Code looks more or less fine, presume you've actually tested it :)

bananas_server/openttd/tcp_content.py Show resolved Hide resolved
bananas_server/web_routes.py Outdated Show resolved Hide resolved
bananas_server/web_routes.py Outdated Show resolved Hide resolved
If on the / URL it is detected that this is in fact a WebSocket,
it will be upgraded and act like a TCP connection. The protocol
is expected to be "binary", and the exact same OpenTTD protocol
is used as with the TCP connection to the server.
@TrueBrain TrueBrain merged commit 0bb407b into OpenTTD:master Dec 15, 2020
6 checks passed
@TrueBrain TrueBrain deleted the websocket branch Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants