#include <iostream> #include <boost/asio.hpp> namespace asio = boost::asio; using asio::ip::tcp; int main(int argc, const char * argv[]) { asio::io_service io_service; tcp::socket socket(io_service); // 接続 socket.connect(tcp::endpoint(asio::ip::address::from_string("127.0.0.1"), 54321)); // メッセージ送信 const std::string msg = "ping"; boost::system::error_code error; asio::write(socket, asio::buffer(ms