<commit_before>﻿using Pigeon.Actor;
using Pigeon.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pigeon.Remote.Transport
{
    public class TcpTransport : Transport
    {
        private TcpServer server;
        public TcpTransport(ActorSystem system, Config config):base(system,config)
        {            
            var protocol = "akka."+config.GetString("transport-protocol");
            this.SchemeIdentifier = protocol;
            var host = config.GetString("hostname");
            var port = config.GetInt("port");
            this.Address = new Address(protocol, system.Name, host, port);
            server = new TcpServer(system, host, port);
        }

        public override Address Listen()
        {
            server.Start();
            return Address;
        }

        public Address Address { get;private set; }

        public override bool IsResponsibleFor(Address remote)
        {
            return true;
        }
    }
}
<commit_msg>added logging in TcpTransport<commit_after>﻿using Pigeon.Actor;
using Pigeon.Configuration;
using Pigeon.Event;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pigeon.Remote.Transport
{
    public class TcpTransport : Transport
    {
        private TcpServer server;
        private LoggingAdapter log;
        public TcpTransport(ActorSystem system, Config config):base(system,config)
        {            
            var protocol = "akka."+config.GetString("transport-protocol");
            this.SchemeIdentifier = protocol;
            var host = config.GetString("hostname");
            var port = config.GetInt("port");
            this.Address = new Address(protocol, system.Name, host, port);
            this.log = Logging.GetLogger(system, this);
            server = new TcpServer(system, host, port);
        }

        public override Address Listen()
        {
            server.Start();
            log.Info("is listening @ {0}", Address);
            return Address;
        }

        public Address Address { get;private set; }

        public override bool IsResponsibleFor(Address remote)
        {
            return true;
        }
    }
}

{'fraction_non_alphanumeric': 0.09354699003897791, 'fraction_numerical': 0.00043308791684711995, 'mean_word_length': 2.2262569832402233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1459135', 'n_tokens_mistral': 590, 'n_tokens_neox': 593, 'n_words': 153}