GithubHelp home page GithubHelp logo

liwenjiequ / nginx-1.14.0-research Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xy008areshsu/nginx-1.14.0-research

0.0 1.0 0.0 19.26 MB

nginx-1.14.0版本的源码分析

License: BSD 2-Clause "Simplified" License

Makefile 0.73% Perl 0.13% Vim Script 2.34% HTML 0.02% C 96.11% C++ 0.28% XS 0.40%

nginx-1.14.0-research's Introduction

nginx-1.14.0版本的源码分析

docs文件夹

docs文件夹存放我们的源码分析文章, 里面的ppt和xmind或者md都是its-tech小组成员的研究总结

src

以注释的方式进行分析说明

例如:

#!/bin/sh

# Copyright (C) Igor Sysoev
# Copyright (C) Nginx, Inc.

# 处理configure命令的参数。
. auto/options
# 初始化后续将产生的文件路径。例如,Makefile,ngx_modules.c等文件默认情况下会在<nginx-source>/objs/
. auto/init
# 分析Nginx的源码结构,这样才能构造后续的Makefile文件
. auto/sources

# 编译过程中所有目录文件生成的路径由--builddir=DIR参数指定,默认情况下为<nginx-source>/objs,此时这个目录将会被创建
test -d $NGX_OBJS || mkdir $NGX_OBJS

#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
#include <ngx_event_connect.h>

/*
  pc当中保存着与上游连接的套接字参数
  1. 打开一个套接字
  2. 设置该套接字为非阻塞
*/
ngx_int_t
ngx_event_connect_peer(ngx_peer_connection_t *pc)
{
    int                rc;
    ngx_int_t          event;
    ngx_err_t          err;
    ngx_uint_t         level;
    ngx_socket_t       s;
    ngx_event_t       *rev, *wev;
    ngx_connection_t  *c;

    rc = pc->get(pc, pc->data);

nginx-1.14.0-research's People

Contributors

jianfengye avatar bambooleaf avatar e421083458 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.