Advertisement

27. Nginx::HTTP::listener::connect::handler

阅读量:

如前所述,在HTTP指令块中针对server的配置,Nginx会生成对应的监听套接字,并将连接处理函数ngx_http_init_connection进行注册。在ngx_event_accept函数中可以发现,该函数会在执行accept操作之后被调用。

复制代码
 /* http/ngx_http_request.h */

    
  
    
 typedef struct {                                 // HTTP连接结构体定义
    
     ngx_http_request_t   *request;               // HTTP请求
    
  
    
     ngx_buf_t           **busy;
    
     ngx_int_t             nbusy;
    
  
    
     ngx_buf_t           **free;
    
     ngx_int_t             nfree;
    
  
    
     ngx_uint_t            pipeline;
    
 } ngx_http_connection_t;
    
  
    
  
    
 /* http/ngx_http_req

全部评论 (0)

还没有任何评论哟~