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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@TrueBrain TrueBrain deleted the websocket branch December 15, 2020 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants