ivan1993spb / snake-server

Snake-Server is a pure Go implementation of the famous arcade game 🐍
https://snakeonline.xyz
MIT License
33 stars 3 forks source link

Make a delay for sending broadcast messages in the game websocket #22

Closed ivan1993spb closed 5 years ago

ivan1993spb commented 5 years ago

There is a broadcast message type in websocket connection to send every player in a game a message.

Now it is possible to send a lot of small broadcasts to the game without any delay and so make a lot of spam and ddos the game server.

The task is to make a delay to prevent such a ddos attack via game websocket. And of cause, create a cli flag to pass a value for the delay.