public MessageManager(CommandManager commandManager, NetworkClient networkClient)
 {
     _networkClient       = networkClient;
     CommandManager       = commandManager;
     _trackedSentMessages = new ConcurrentBag <NetworkMessage>();
     _networkStreamTransmissionHandler = new NetworkStreamTransmissionHandler(networkClient, this);
 }
 public PreparedNetworkMessage(NetworkClient networkClient, NetworkPacket networkPacket, NetworkStreamTransmissionHandler networkStreamTransmissionHandler)
 {
     NetworkClient  = networkClient;
     NetworkPacket  = networkPacket;
     NetworkSth     = networkStreamTransmissionHandler;
     NetworkMessage = networkPacket.PacketType == NetworkPacket.Type.Request ?
                      new NetworkRequest(NetworkPacket.NetworkId, NetworkPacket.CommandName, NetworkPacket.CommandParameters) :
                      new NetworkMessage(NetworkPacket.NetworkId, NetworkPacket.CommandName, NetworkPacket.CommandParameters);
 }