ping on the wobseckot
This commit is contained in:
parent
b2618e1ba8
commit
9e66855dc6
2
game.go
2
game.go
@ -41,6 +41,8 @@ func applyAction(g *game.Match, a action) error {
|
||||
return g.Apply(a.Player, 6)
|
||||
case "7":
|
||||
return g.Apply(a.Player, 7)
|
||||
case "ping":
|
||||
return nil
|
||||
default:
|
||||
return errWeirdAction
|
||||
}
|
||||
|
@ -37,7 +37,13 @@ const toggleDark = useToggle(dark);
|
||||
const theme = computed(() => dark.value ? 'dark' : 'light');
|
||||
const themeIcon = computed(() => dark.value ? 'mdi-moon-waxing-crescent' : 'mdi-white-balance-sunny');
|
||||
|
||||
const { status, data, send, open } = useWebSocket<string>(`wss://${window.location.host}/queue`, { immediate: false });
|
||||
const { status, data, send, open } = useWebSocket<string>(`wss://${window.location.host}/queue`, {
|
||||
immediate: false,
|
||||
heartbeat: {
|
||||
interval: 5000,
|
||||
message: '{"action":"ping"}',
|
||||
},
|
||||
});
|
||||
const game = ref<Game | null>(null);
|
||||
const dealer = ref<boolean | null>(null);
|
||||
watchEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user