In order to add additional packet injection, it would be great to be able to modify the incoming and outgoing byte stream per packet.
This will be an advanced feature only for those who know what they are doing.
Create an interface IPacketInjector with uint MessageId {get;}, IIncomingPacketInjector with ModifyIncomingPacket(Server, GameSession, IIncomingPacket), IOutgoingPacketInjector with ModifyOutgoingPacket(Server, GameSession, IOutgoingPacket)
Modify IIncomingPacket to be backed by an RecyclableMemoryStream
In TcpGameServer and WebsocketGameServer, inject IEnumerable<IIncomingPacketInjector>, IEnumerable<IOutgoingPacketInjector>
Call the incoming injectors before executing the packet, call the outgoing injectors after executing the packet but before sending it to the client.
In order to add additional packet injection, it would be great to be able to modify the incoming and outgoing byte stream per packet. This will be an advanced feature only for those who know what they are doing.
IPacketInjector
withuint MessageId {get;}
,IIncomingPacketInjector
withModifyIncomingPacket(Server, GameSession, IIncomingPacket)
,IOutgoingPacketInjector
withModifyOutgoingPacket(Server, GameSession, IOutgoingPacket)
IIncomingPacket
to be backed by anRecyclableMemoryStream
TcpGameServer
andWebsocketGameServer
, injectIEnumerable<IIncomingPacketInjector>
,IEnumerable<IOutgoingPacketInjector>