(thread.c):
Highlighter" data-iceapw="38" data-iceapc="49">
- conn_queue_item {
- sfd out of the;
- init_state;
- event_flags;
- read_buffer_size;
- is_udp;
(thread.c):
to establish a connection fd
thread process:
encapsulates create listening socket bound address,set the non-blocking mode and register the listening socket
thread_init all workers thread,look at the core code thread_init
all workers thread pipe read end the libevent of read events,wait for the main thread last all workers CQ initialization
SFD is already established connection descriptor,by conn_new function of the descriptor registration the libevent read event,me-> Base on behalf of a thread structure,that is the descriptor event processing the to this workersThreading,the most important elements of conn_new method is: