// // client.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include #include #include "StockClient.hpp" int main(int argc, char* argv[]) { try { // Check command line arguments. if (argc != 3) { std::cerr << "Usage: client " << std::endl; return 1; } boost::asio::io_service io_service; StockClient client(io_service, argv[1], argv[2]); io_service.run(); } catch (std::exception& e) { std::cerr << e.what() << std::endl; } return 0; }