Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Boost.Asio入門

Ryo Okubo
March 31, 2014

 Boost.Asio入門

会社の同期向け勉強会で発表した Boost.Asioの基本的な説明とか自分の気になった部分を調べたまとめ。

Ryo Okubo

March 31, 2014
Tweet

More Decks by Ryo Okubo

Other Decks in Programming

Transcript

  1. Boost.Asio ʹ͓͚Δ Proactor io_service ΦϒδΣΫτΛհͯ͠ I/O Λॲཧ͢Δ $:@.>< 8A7> I/O$+91*-6$

    (:$3/46) io_service +;?B5)A.025< ①$I/O+9 1*-6  ② 8A7> "  ③io_service$(run() !(  ④$I/O$ (  ⑤$I/O  %  ,=B#'& io_service$'( ⑥I/O$( 8A7>#&$
  2. Asio ʹΑΔඇಉظTCP௨৴ boost::asio::ip::tcp::socket TCPιέοτΛදݱ͢Δ I/O ΦϒδΣΫτ boost::asio::async_connect ඇಉظʹ connect ͢Δ

    boost::asio::ip::tcp::socket::async_accept ඇಉظʹ accept ͢Δ boost::asio::async_(read | write) ඇಉظʹ read/write ͢Δ