#include <iostream>
#include "boost/asio.hpp"
using namespace std;
using namespace boost::asio;
io_service G_IOS;
int main() {
ip::tcp::endpoint ep(ip::tcp::v4(), 2110);
ip::tcp::acceptor acceptor(G_IOS, ep);
while (true) {
ip::tcp::socket sock(G_IOS);
acceptor.accept(sock);
cout << "client addr = " << sock.remote_endpoint().address() << endl;
sock.write_some(buffer("hello asio"));
}
return 0;
}