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

feat: updates via websockets #3

Merged
merged 16 commits into from
Dec 25, 2023

Conversation

JeanJPNM
Copy link
Contributor

@JeanJPNM JeanJPNM commented Dec 13, 2023

Implements update functionality via a websocket connection.
Closes #2.

Todo:

  • Define types of messages that the server can receive
  • Define config options for the websocket server
  • Handle cases where the server's port is already in use

@JeanJPNM
Copy link
Contributor Author

JeanJPNM commented Dec 13, 2023

Here is a POC I made with a modified version of the mlogjs web editor

websockets_demo.mp4

@JeanJPNM JeanJPNM changed the title Websocket support feat: updates via websockets Dec 16, 2023
@Sharlottes Sharlottes marked this pull request as ready for review December 22, 2023 15:28
This change greatly reduces the likelyhood of the websocket
server not being closed properly when the game is closed
This is the recommended way to define the config screen
of a mod
This change updates the config page to let users set the
websocket server's port and restart it, as well as
restoring mod options to their defaults
This event is fired by the game before it is closed,
this allows the mod to clean up the used resources in a
much more consistent way.
@JeanJPNM
Copy link
Contributor Author

The pull request is pretty much done, but both the korean and english bundles require some attention, one needs to be updated and the other needs to be checked to see if it is clear and concise enough.

@Sharlottes
Copy link
Owner

thanks for your contribution! i'll test PR build mod today and merge it. @JeanJPNM

@Sharlottes
Copy link
Owner

@JeanJPNM is your demo released already? i cannot test on your unreleased mlogjs web editor

@JeanJPNM
Copy link
Contributor Author

You have to go to the pull request's preview link: https://deploy-preview-221--mlogjs.netlify.app/editor.html

@Sharlottes
Copy link
Owner

it works on my machine too.
https://github.com/Sharlottes/MlogWatcher/assets/60801210/0c5f024a-f6b3-4e45-8b61-09af5150d762

thanks for your contribution very much. the PR will be merged.

@Sharlottes Sharlottes merged commit b1f1b01 into Sharlottes:master Dec 25, 2023
2 checks passed
@JeanJPNM JeanJPNM deleted the websocket-support branch December 25, 2023 13:39
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.

Allow updates via http requests
2 participants