<commit_before>//
// Created by Sam on 9/25/2017.
//

#ifndef WHISPERERENGINE_SERVER_H
#define WHISPERERENGINE_SERVER_H


#include <queue>
#include "Client.h"

class Player;

class Server
{
public:
    std::vector<Client::pointer> clients;
    std::queue<Player*> queue;

    void WriteToAll(std::string data);
    Server(boost::asio::io_service& ioService, int port);

private:
    boost::asio::ip::tcp::acceptor acceptor;

    void Start();
    void OnAccept(Client::pointer connection, const boost::system::error_code& error);

    static void DoClose(Client::pointer connection);
};

#endif //WHISPERERENGINE_SERVER_H<commit_msg>DoClose to Close for better readability.<commit_after>//
// Created by Sam on 9/25/2017.
//

#ifndef WHISPERERENGINE_SERVER_H
#define WHISPERERENGINE_SERVER_H


#include <queue>
#include "Client.h"

class Player;

class Server
{
public:
    std::vector<Client::pointer> clients;
    std::queue<Player*> queue;

    void WriteToAll(std::string data);
    Server(boost::asio::io_service& ioService, int port);

private:
    boost::asio::ip::tcp::acceptor acceptor;

    void Start();
    void OnAccept(Client::pointer connection, const boost::system::error_code& error);

    static void Close(Client::pointer connection);
};

#endif //WHISPERERENGINE_SERVER_H
{'fraction_non_alphanumeric': 0.13245546088303642, 'fraction_numerical': 0.010844306738962044, 'mean_word_length': 5.0093023255813955, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7523646', 'n_tokens_mistral': 447, 'n_tokens_neox': 416, 'n_words': 98}