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

Move Server Protocol to livesplit-core #932

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

CryZe
Copy link
Collaborator

@CryZe CryZe commented Jun 22, 2024

This moves the server protocol to livesplit-core and improves on it in various ways:

  • The protocol is based on JSON messages. This allows for example for more structured commands where it's easier to provide multiple arguments for a command and even have optional arguments.
  • For each command, there is a corresponding response. It is either a success response with possibly the value that you requested, or an error response with an error code.
  • On top of the responses you also get sent event messages that indicate changes to the timer. These can either be changes triggered via a command that you sent or by changes that happened through other sources, such as the user directly interacting with the timer or an auto splitter.

The protocol is still work in progress and we will evolve it into a protocol that fully allows synchronizing timers over the network.

The event sink has now been renamed to command sink, because there is now a clear distinction between incoming commands and events that are the results of these commands.

Changelog: The protocol used for the server connection has been significantly improved. There is a response for each command and clear errors when something goes wrong. Additionally, there are now event messages that indicate changes to the timer.

This moves the server protocol to `livesplit-core` and improves on it in
various ways:
- The protocol is based on JSON messages. This allows for example for
  more structured commands where it's easier to provide multiple
  arguments for a command and even have optional arguments.
- For each command, there is a corresponding response. It is either a
  `success` response with possibly the value that you requested, or an
  `error` response with an error `code`.
- On top of the responses you also get sent `event` messages that
  indicate changes to the timer. These can either be changes triggered
  via a command that you sent or by changes that happened through other
  sources, such as the user directly interacting with the timer or an
  auto splitter.

The protocol is still work in progress and we will evolve it into a
protocol that fully allows synchronizing timers over the network.

The event sink has now been renamed to command sink, because there is
now a clear distinction between incoming commands and events that are
the results of these commands.

Changelog: The protocol used for the server connection has been
significantly improved. There is a response for each command and clear
errors when something goes wrong. Additionally, there are now event
messages that indicate changes to the timer.
@CryZe CryZe added the enhancement A new feature or general improvement to LiveSplit One. label Jun 22, 2024
@CryZe CryZe changed the title More Server Protocol to livesplit-core Move Server Protocol to livesplit-core Jun 22, 2024
@CryZe CryZe merged commit f681701 into LiveSplit:master Jun 22, 2024
1 check passed
@CryZe CryZe deleted the server-protocol-in-lsc branch June 22, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or general improvement to LiveSplit One.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant