view client/main.cpp @ 121:48f7e7277ab6

CMake: set CMake variables in libraries
author David Demelier <markand@malikania.fr>
date Fri, 22 Sep 2017 12:56:55 +0200
parents 4031eda60e11
children f58075b58fa1
line wrap: on
line source

/*
 * main.cpp -- main client file
 *
 * Copyright (c) 2013-2017 David Demelier <markand@malikania.fr>
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <malikania/client/connection.hpp>
#include <malikania/client/client.hpp>

int main()
{
    boost::asio::io_service service;

    mlk::client::connection cn(service);
    mlk::client::client client(service, cn);

    client.connect("localhost", 3320);

    for (;;) {
        service.run();
    }
}