You can search the dispatch classes (Player in this example) under `lib/LasTres/Controller/`, the files ending in `.pm` children of this directory are the recognized dispatch classes.
### Websocket how-to.
Only a web endpoint listens to server websockets, but you can do many different
things with websockets, that is achieved by packets.
When developing LasTres we wanted to avoid having to reinvent the wheel for every
input or output packet that is why we made interfaces that define what
a class defining a packet should look like.
This interfaces are `lib/LasTres/Controller/Websocket/InputPacket.pm` and `lib/LasTres/Controller/Websocket/OutputPacket.pm`.
A class that pretends to be a Input or Output packet must comply with three basic rules:
* The first one is that it must implement the pertinent interface, for example:
Of course to comply with this rule you will have to implement every method in `requires`.
* The second one is that a input packet class should be located into `lib/LasTres/Controller/Websocket/InputPacket/` and a output packet into `lib/LasTres/Controller/Websocket/OutputPacket/`.
* The third one is that the identifier of your packet must be unique among the packets of its kind input/output.
### Pubsub
Something happened in a player websocket input packet or in the event loop and now every player in their team or location must be notified or their on screen information should be updated.
What can we do? Easy, thanks to Redis pubsub implementation we can execute an action into the event loop that contains the player websocket and we can send them the information required.
Currently the code handling Redis pubsub packets is defined into `lib/LasTres/Controller/Websocket/InputPacket/Init.pm`, this is not ideal because Redis amerit its own
packet structure, but it is technical debt and won't be addressed in this stage of development until it becomes a problem.