<commit_before>#include "worker.h"
using namespace boost::asio::ip;

Worker::Worker():_io_service(),
				 daemon_socket(_io_service){
	daemon_port = 7600;
}

Worker::~Worker(){}

void Worker::runThreads(int argc, char **argv){
	_thread_group.add_thread(new boost::thread(&Worker::daemonConnHandler,this));
	_thread_group.join_all();
}

void Worker::daemonConnHandler(){
	tcp::endpoint daemon_conn_endpoint(address::from_string("127.0.0.1"), daemon_port);
	daemon_socket.connect(daemon_conn_endpoint);
	std::vector<char> message(5);
	boost::asio::read(daemon_socket,boost::asio::buffer(message,5));
	std::cout<<message.size();
	std::cout<<std::string(message.begin(), message.end());
}



int main(int argc, char** argv){
	try{
		Worker worker;
		worker.runThreads(argc, argv);
	}
	catch(boost::system::system_error &e){
		std::cout<<e.what();
	}
	return 0;
}<commit_msg>Working as intended<commit_after>#include "worker.h"
using namespace boost::asio::ip;

Worker::Worker():_io_service(),
				 daemon_socket(_io_service){
	daemon_port = 7600;
}

Worker::~Worker(){}

void Worker::runThreads(int argc, char **argv){
	_thread_group.add_thread(new boost::thread(&Worker::daemonConnHandler,this));
	_thread_group.join_all();
}

void Worker::daemonConnHandler(){
	tcp::endpoint daemon_conn_endpoint(address::from_string("127.0.0.1"), daemon_port);
	daemon_socket.connect(daemon_conn_endpoint);
	std::vector<char> message(2);
	boost::asio::read(daemon_socket,boost::asio::buffer(message,2));
	std::cout<<std::string(message.begin(), message.end());
}



int main(int argc, char** argv){
	try{
		Worker worker;
		worker.runThreads(argc, argv);
	}
	catch(boost::system::system_error &e){
		std::cout<<e.what();
	}
	return 0;
}
{'fraction_non_alphanumeric': 0.1839348079161816, 'fraction_numerical': 0.015133876600698487, 'mean_word_length': 8.047368421052632, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2429928', 'n_tokens_mistral': 654, 'n_tokens_neox': 619, 'n_words': 91}