本文整理汇总了C++中boost::asio::io_service::wrap方法的典型用法代码示例。如果您正苦于以下问题:C++ io_service::wrap方法的具体用法?C++ io_service::wrap怎么用?C++ io_service::wrap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::asio::io_service
的用法示例。
在下文中一共展示了io_service::wrap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: new_channel_set_extension
void new_channel_set_extension(boost::asio::io_service &io_service, avbot & mybot , std::string channel_name)
{
mybot.on_message.connect(
joke(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 0)),
channel_name, boost::posix_time::seconds(600)
)
);
mybot.on_message.connect(
::urlpreview(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 1)),
channel_name
)
);
#ifdef ENABLE_LUA
mybot.on_message.connect(
::callluascript(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 1)),
channel_name
)
);
#endif
mybot.on_message.connect(
::bulletin(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 1)),
channel_name
)
);
mybot.on_message.connect(
::metalprice(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 1)),
channel_name
)
);
mybot.on_message.connect(
::stockprice(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 1)),
channel_name
)
);
mybot.on_message.connect(
::exchangerate(io_service,
io_service.wrap(boost::bind(sender, boost::ref(mybot), channel_name, _1, 1)),
channel_name
)
);
}