I am working on a multiplayer android app and trying to implement a part of the game which a player can attack to a nearby player. I have decided to use socket io for that purpose.
This is what I have already implemented:
However, if someone finds a way to connect the socket io server (which is possible with just using a connection url), they can emit "attack" event with a player id data (without using android application). How can I detect that from a server side? Maybe I can create a session on the server when a player login from the android application and allow the player to emit event through that session, but I do not know how I can do that.