GithubHelp home page GithubHelp logo

Comments (6)

yaoweibin avatar yaoweibin commented on June 16, 2024

有具体的代码出处吗?

from nginx-book.

wangbin579 avatar wangbin579 commented on June 16, 2024

对于监听的socket,其注册的时候:

epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=3033583632, u64=47578386321424}}) = 0

并没有设置EPOLLET,而epoll默认是水平触发(The default behaviour for epoll is Level Triggered)

from nginx-book.

monadbobo avatar monadbobo commented on June 16, 2024

listen的句柄都是水平触发的。

from nginx-book.

zhuzhaoyuan avatar zhuzhaoyuan commented on June 16, 2024

监听的是LT,accept的新连接(epoll的时候)是ET。

from nginx-book.

wangbin579 avatar wangbin579 commented on June 16, 2024

epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=529362960, u64=47575882100752}}) = 0
gettimeofday({1361245029, 209264}, NULL) = 0
epoll_wait(3, {{EPOLLIN, {u32=529362960, u64=47575882100752}}}, 8192, 4294967295) = 1 //新的连接到来事件
gettimeofday({1361245031, 839885}, NULL) = 0
accept(6, {sa_family=AF_INET, sin_port=htons(39729), sin_addr=inet_addr("xxx.xxx.xxx.161")}, [16]) = 7 //accept
ioctl(7, FIONBIO, [1]) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLET, {u32=529363144, u64=47575882100936}}) = 0 //对这个新的tcp连接的后续过程设置EPOLLET
epoll_wait(3, {{EPOLLIN, {u32=529363144, u64=47575882100936}}}, 8192, 8000) = 1
gettimeofday({1361245031, 840149}, NULL) = 0
recvfrom(7, "GET /index.html HTTP/1.1\r\nUser-A"..., 1024, 0, NULL, NULL) = 136
epoll_ctl(3, EPOLL_CTL_MOD, 7, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=529363144, u64=47575882100936}}) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 8
ioctl(8, FIONBIO, [1]) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=529363328, u64=47575882101120}}) = 0
connect(8, {sa_family=AF_INET, sin_port=htons(18080), sin_addr=inet_addr("xxx.xxx.xxx.161")}, 16) = -1 EINPROGRESS (Operation now in progress)
epoll_wait(3, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=529363328, u64=47575882101120}}, {EPOLLOUT, {u32=529363144, u64=47575882100936}}}, 8192, 60000) = 2
gettimeofday({1361245031, 840608}, NULL) = 0
getsockopt(8, SOL_SOCKET, SO_ERROR, [-7710985409072725905], [4]) = 0
write(4, "2013/02/19 11:37:11 [error] 2193"..., 274) = 274
close(8) = 0
getsockname(7, {sa_family=AF_INET, sin_port=htons(28080), sin_addr=inet_addr("xxx.xxx.xxx.161")}, [16]) = 0
writev(7, [{"HTTP/1.1 502 Bad Gateway\r\nServer"..., 152}, {"\r\n<title>502 Bad Gat"..., 176}, {" Sorry for the inconvenience.<br"..., 347}, {"


Powered by Tengine\r\n"..., 43}], 5) = 770
write(5, "xxx.xxx.xxx.161 - - [19/Feb/2013:"..., 147) = 147
setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
recvfrom(7, "", 1024, 0, NULL, NULL) = 0
close(7) = 0
epoll_wait(3,

from nginx-book.

yaoweibin avatar yaoweibin commented on June 16, 2024

谢谢,我已经修正了这个错误描述。

from nginx-book.

Related Issues (20)

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.