Welcome message is not needed

This commit is contained in:
arne 2024-03-21 00:57:54 +01:00
commit d00a636a68

View file

@ -3,7 +3,6 @@ type WebsocketData = {
} }
type Message = type Message =
| { type: 'welcome', id: string }
| { type: 'presence-information', others: number } | { type: 'presence-information', others: number }
| { type: 'ripple', position: [number, number], maxRadius: number } | { type: 'ripple', position: [number, number], maxRadius: number }
@ -25,10 +24,6 @@ const _server = Deno.serve({
socket.addEventListener("open", () => { socket.addEventListener("open", () => {
// register newly connected client and tell them how many other people are there // register newly connected client and tell them how many other people are there
console.log('Connection opened', clientId, clients) console.log('Connection opened', clientId, clients)
socket.send(JSON.stringify(<Message>{
type: 'welcome',
id: clientId
}))
const enterNotice = JSON.stringify(<Message>{ const enterNotice = JSON.stringify(<Message>{
type: 'presence-information', type: 'presence-information',
others: clients.size, others: clients.size,