<commit_before>﻿using PortForward.Utilities.Decoding;
using PortForwardApp.Logging;
using System;
using System.Threading.Tasks;

namespace PortForward
{
    public class ConsoleClient : Client
    {
        private TaskFactory _taskFactory;
        private IDecoder _decoder;
        private ILogger _logger;

        public ConsoleClient(Socket socket, IDecoder decoder, ILogger logger)
            : base(socket)
        {
            _decoder = decoder;
            _logger = logger;
            _taskFactory = new TaskFactory();
        }

        public override void Push(byte[] data)
        {
            _taskFactory.StartNew(() => base.Push(data));
            string message = _decoder.Decode(data);
            _logger.Log("Message sent: {0}", message);
        }

        protected override void HandleResponse(byte[] data)
        {
            string message = _decoder.Decode(data);
            _logger.Log("Message received: {0}", message);
        }
    }
}<commit_msg>async push on console client a little overkill<commit_after>﻿using PortForward.Utilities.Decoding;
using PortForwardApp.Logging;

namespace PortForward
{
    public class ConsoleClient : Client
    {
        private IDecoder _decoder;
        private ILogger _logger;

        public ConsoleClient(Socket socket, IDecoder decoder, ILogger logger)
            : base(socket)
        {
            _decoder = decoder;
            _logger = logger;
        }

        public override void Push(byte[] data)
        {
            base.Push(data);
            string message = _decoder.Decode(data);
            _logger.Log("Message sent: {0}", message);
        }

        protected override void HandleResponse(byte[] data)
        {
            string message = _decoder.Decode(data);
            _logger.Log("Message received: {0}", message);
        }
    }
}
{'fraction_non_alphanumeric': 0.08992416034669556, 'fraction_numerical': 0.0021668472372697724, 'mean_word_length': 2.098993288590604, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4884160', 'n_tokens_mistral': 486, 'n_tokens_neox': 471, 'n_words': 124}