本文整理汇总了C++中server::get_logger方法的典型用法代码示例。如果您正苦于以下问题:C++ server::get_logger方法的具体用法?C++ server::get_logger怎么用?C++ server::get_logger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server
的用法示例。
在下文中一共展示了server::get_logger方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: srv
/*
* Constructs a new IRC client on top of hte specified socket and event base.
*/
irc_client::irc_client (server &srv, struct event_base *evbase, int sock)
: srv (srv), log (srv.get_logger ())
{
this->evbase = evbase;
this->sock = sock;
this->bufev = bufferevent_socket_new (evbase, sock, BEV_OPT_CLOSE_ON_FREE);
bufferevent_setcb (this->bufev, &hCraft::irc_client::handle_read,
&hCraft::irc_client::handle_write, &hCraft::irc_client::handle_event, this);
bufferevent_enable (this->bufev, EV_READ | EV_WRITE);
this->total_read = 0;
this->fail = false;
this->connected = false;
}