Lara Framework

Packet system

Lara framework is equiped with a high performance packet system, that enables developers to send user-defined TCP and UDP packets.

In order to be able to handle packets, the interface IServerHandler or IClientHandler must be implemented and added through dependency injection.


The declaration of the IServerHandler interface looks like this:




Now, let's send 2 simple packets from client to server:




On server side, we create a packet handler class, that implements IServerHandler interface:




Then we add the packet handler to Server through dependency injection.




Back to Serialization system