-
Notifications
You must be signed in to change notification settings - Fork 4
45 game better websocket connexiondisconnexion #51
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
base: main
Are you sure you want to change the base?
Conversation
add -dev to containers's name to differenciate dev services upgrade colima s rule to not restart if mount are correct Makefile make/colima.mk srcs/dev-docker-compose.yml
Merge branch 'game-ws-connection' into 45-game-better-websocket-connexiondisconnexion
rom98759
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok pour moi
| reason: reason.toString(), | ||
| }); | ||
| upstreamWs.close(); | ||
| upstreamWs.close(code, reason); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trop bien et plus clair
| // showPanel(panel: 'settings' | 'game-logs' | 'game-sessions') { | ||
| // ['settings', 'game-logs', 'game-sessions'].forEach((id) => { | ||
| // const el = document.getElementById(id); | ||
| // if (el) { | ||
| // el.classList.toggle('hidden', id !== panel); | ||
| // } | ||
| // }); | ||
| // if (panel === 'game-sessions') { | ||
| // this.sessionsInterval = window.setInterval(() => this.loadSessions(), 2000); | ||
| // } else if (this.sessionsInterval) { | ||
| // clearInterval(this.sessionsInterval); | ||
| // this.sessionsInterval = null; | ||
| // } | ||
| // } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A supp ?
| <div class="bg-white/10 backdrop-blur-lg rounded-lg p-4 max-w-2xl mx-auto"> | ||
| <div class="flex justify-around text-white"> | ||
| <div class="text-center"> | ||
| <p class="text-sm text-purple-300">Player 1</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mettre le nom des joueurs ?
codastream
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool pour le dockerfile dev
est-ce qu;on peut faire en sorte que les PR a partir de maintenant n'ajoutent pas de lints ESLint ? (on peut typer autrement qu'avec any, enlever les variables non utilisées, utiliser const plutôt que var et si possible que let
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }; | ||
| } | ||
|
|
||
| export async function webSocketConnect(this: FastifyInstance, socket: any, req: FastifyRequest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ws fournit un type WebSocket ?
WebSocket connexion and disconnection are better handled: