Your write handler does nothing and returns. Once it returns, your main thread exits the run() and the program terminates. You should always have an async request pending, or alternatively a work object. That is covered in the asio tutorial http://www.boost.org/doc/libs/release/doc/html/boost_asio/tutorial.html