<commit_before>#ifndef WATCHER_CLIENT_HPP
#define WATCHER_CLIENT_HPP

#include <string>
#include <boost/asio.hpp>
#include <boost/noncopyable.hpp>
#include "logger.h"

#include "clientConnection.h"
#include "message.h"

namespace watcher 
{
    //
    // The top-level class of a watcherd client. 
    //
    // Currently it's just a thin wrapper around the clientConnection class. 
    // In the future, I may make this class a little easier to use by: 
    // - put it in a library 
    // - remove boost dependencies, etc
    // - add a got-a-response callback, etc. 
    //
    class Client : private boost::noncopyable
    {
        public:
            /// Construct the Client to connect to the specified TCP address and service.
            // to send messages. Default service is "watcherd" - a watcherd running somewhere.
            explicit Client(const std::string& server, const std::string& service="watcherd");

            bool sendMessage(const boost::shared_ptr<Message> message);

        protected:
        private:

            DECLARE_LOGGER();

            boost::asio::io_service ioService;

            std::string server;
            std::string service;

            ClientConnectionPtr clientConnection;

    };
} // namespace watcher

#endif // WATCHER_CLIENT_HPP<commit_msg>declare typedef to shared+ptr for Client.<commit_after>#ifndef WATCHER_CLIENT_HPP
#define WATCHER_CLIENT_HPP

#include <string>
#include <boost/asio.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include "logger.h"

#include "clientConnection.h"
#include "message.h"

namespace watcher 
{
    //
    // The top-level class of a watcherd client. 
    //
    // Currently it's just a thin wrapper around the clientConnection class. 
    // In the future, I may make this class a little easier to use by: 
    // - put it in a library 
    // - remove boost dependencies, etc
    // - add a got-a-response callback, etc. 
    //
    class Client : private boost::noncopyable
    {
        public:
            /// Construct the Client to connect to the specified TCP address and service.
            // to send messages. Default service is "watcherd" - a watcherd running somewhere.
            explicit Client(const std::string& server, const std::string& service="watcherd");

            bool sendMessage(const boost::shared_ptr<Message> message);

        protected:
        private:

            DECLARE_LOGGER();

            boost::asio::io_service ioService;

            std::string server;
            std::string service;

            ClientConnectionPtr clientConnection;
    };

    typedef boost::shared_ptr<Client> ClientPtr;

} // namespace watcher

#endif // WATCHER_CLIENT_HPP
{'fraction_non_alphanumeric': 0.09565857247976453, 'fraction_numerical': 0.0, 'mean_word_length': 2.472541507024266, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '7422738', 'n_tokens_mistral': 766, 'n_tokens_neox': 742, 'n_words': 243}