libevent源码 event_config_new(),event_base_new_with_config(const struct event_config *)

struct event_config *event_config_new(void);

/**
   Allocates a new event configuration object.
  分配一个新的event_config对象
   The event configuration object can be used to change the behavior of
   an event base.
  event_config对象可以用于更改event base的行为
   @return an event_config object that can be used to store configuration, or
     NULL if an error is encountered.
  返回一个event_config 对象,由于存储配置,当发生错误返回NULL @see event_base_new_with_config(), event_config_free(), event_config
*/

 

struct event_base *event_base_new_with_config(const struct event_config *);

/**
  Initialize the event API.
  初始化event接口 Use event_base_new_with_config() to initialize a new event base, taking the specified configuration under consideration. The configuration object can currently be used to avoid certain event notification mechanisms.   通过event_base_new_with_config(),使用指定位置的配置来初始化一个新的event base.
使用的配置对象可用于避免默写事件通知机制。
@param cfg the event configuration object 配置对象,为event使用 @return an initialized event_base that can be used to registering events, or NULL if no event base can be created with the requested event_config.
  可用于注册事件的已初始化的event_base,如果为NULL,表示以指定的event_config,不能穿件event base @see event_base_new(), event_base_free(), event_init(), event_assign()
*/

 

posted @ 2020-07-15 13:54  N_zero  阅读(512)  评论(0)    收藏  举报