Libevent Source Analysis 1----evnet related structure analysis

Source: Internet
Author: User

is located in code event-internal.h.

Event_base a collection of similar events, you create an event and you must specify a collection for the event.

struct Event_base {
The const struct EVENTOP *evsel; /*evsel and Evbase on the relationship between the analogy and the class and the object, Evbase is Evsel
511 specific implementations, referring to the reuse model used here */
*evbase void;
53/* The number of events that this event_base is concerned with */
Event_count int; /* counts number of total events * *
55/* Number of active events in this event_base */
event_count_active int; /* counts number of active events */
57/* Determine the condition of the loop exit */
Event_gotterm int; /* Set to terminate loop */
Event_break int; /* Set to terminate loop immediately */
60
*/* Active Event Management */
62/* Save the event chain list, execute the chain with different priority events, so use level two pointers to activate the list of events */
Event_list **activequeues;
64/* Number of event lists, data is determined by priority
nactivequeues int;
66
*/* Signal Handling Info * *
68/* Separate structure for handling signal events */
The Evsignal_info sig, a struct;
70/* The list of all events is stored */
Event_list EventQueue, a struct;
Timeval Event_tv of the struct;
73/* Management and timeout events related time small top heap */
Min_heap Timeheap, a struct;
75/* Time buffer for storage time */
The Timeval tv_cache of the struct;
77};

Libevent Source Analysis 1----evnet related structure analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.