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

Keep track of reservation time client-side and add debug settings to aid development #12

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

starcraft66
Copy link
Member

This PR adds:

  • Client-side reservation time tracking
  • Better development facilities

Client-side time tracking

The client now starts a timer when a new reservation is created. This timer ticks until the end of the session, at which point the session manager will log the user out. This prevents "lag switching" the client to get unlimited play time by interrupting its network connection at the moment that the client would receive the end of reservation message through the Phoenix channel. The timer can also be extended by the server over the Phoenix channel to add more play time to the current session.

Better development facilities

Two debug configuration options are added, one allows the client to react to messages destined to any station (i.e. the development computer's hostname doesn't need to match the production hostname scheme. For obvious reasons, this isn't suitable when more than 1 client is connected to the server. The other option allows swapping out the session manager implementation with a dummy one that simply logs to the console instead of starting and stopping interactive windows sessions which are both very disruptive to the development workflow.

@starcraft66 starcraft66 merged commit 628d87a into main Jan 29, 2024
2 checks passed
@starcraft66 starcraft66 deleted the feature/tgh/better-debugging branch January 29, 2024 07:22
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

1 participant