服务端:
Process 23432 attached - interrupt to quit
gettimeofday({1405525345, 729161}, NULL) = 0
epoll_wait(8, {{EPOLLIN, {u32=150049720, u64=13221331005772764088}}}, 512, -1) = 1
gettimeofday({1405525613, 235537}, NULL) = 0
accept4(6, {sa_family=AF_INET, sin_port=htons(58465), sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 3
epoll_ctl(8, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLET, {u32=150049912, u64=13828384397808735352}}) = 0
epoll_wait(8, {{EPOLLIN, {u32=150049912, u64=13828384397808735352}}}, 512, 60000) = 1
gettimeofday({1405525613, 242725}, NULL) = 0
recv(3, "GET / HTTP/1.0\r\nUser-Agent: Wget"..., 1024, 0) = 107
stat64("/usr/local/nginx/html/index.html", {st_mode=S_IFREG|0644, st_size=151, ...}) = 0
open("/usr/local/nginx/html/index.html", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 9
fstat64(9, {st_mode=S_IFREG|0644, st_size=151, ...}) = 0
writev(3, [{"HTTP/1.1 200 OK\r\nServer: nginx/1"..., 215}], 1) = 215
sendfile64(3, 9, [0], 151) = 151
write(4, "127.0.0.1 - - [16/Jul/2014:08:46"..., 96) = 96
close(9) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
recv(3, "", 1024, 0) = 0
close(3) = 0
epoll_wait(8,
</pre><p></p><p></p><p></p><p>客户端:</p><pre name="code" class="html">
[root@localhost wg]# wget http://localhost/
--2014-07-16 08:46:53-- http://localhost/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... failed: Connection refused.
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 151 [text/html]
Saving to: “index.html.1”
100%[======================================>] 151 --.-K/s in 0.03s
2014-07-16 08:46:53 (4.82 KB/s) - “index.html.1” saved [151/151]
分析: