dimanche 29 novembre 2015

How to completely convert boost::asio code to C++11/asio without boost for deadline_timer?

My goal is to have my project to use asio library without boost, but use C++11. The example is to convert this server code to use Timeout. Here is what I did:

  1. boost::bind -> std::bind, _1 -> std::placeholders::_1
  2. most boost::asio::xxx -> asio::xxx
  3. boost::system::error_code -> asio::error_code

Now, there is 12 errors left all about deadline_timer :

deadline_timer input_deadline_;
input_deadline_.expires_at(boost::posix_time::pos_infin)

what is the correct code to use? I am using g++4.9.1/2, and newly downloaded asio library 1.10.6.

Aucun commentaire:

Enregistrer un commentaire