Lines Matching refs:io_ctx
156 void server( std::shared_ptr< boost::asio::io_context > const& io_ctx, tcp::acceptor & a) { in server() argument
160 socket_ptr socket( new tcp::socket( * io_ctx) ); in server()
174 io_ctx->stop(); in server()
181 void client( std::shared_ptr< boost::asio::io_context > const& io_ctx, tcp::acceptor & a, in client() argument
185 tcp::resolver resolver( * io_ctx); in client()
188 tcp::socket s( * io_ctx); in client()
233 … std::shared_ptr< boost::asio::io_context > io_ctx = std::make_shared< boost::asio::io_context >(); in main() local
234 boost::fibers::use_scheduling_algorithm< boost::fibers::asio::round_robin >( io_ctx); in main()
239 tcp::acceptor a( * io_ctx, tcp::endpoint( tcp::v4(), 9999) ); in main()
240 boost::fibers::fiber( server, io_ctx, std::ref( a) ).detach(); in main()
247 client, io_ctx, std::ref( a), std::ref( b), iterations).detach(); in main()
251 io_ctx->run(); in main()