Skip to content

Commit eb5d0cc

Browse files
committed
update netpoll
1 parent 4dfe014 commit eb5d0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netpoll.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ func accept(s int) (int, syscall.Sockaddr, string, error) {
542542

543543
```
544544

545-
可以看到,最终还是用 syscall 中的 accept4 或 accept 完成了系统调用。
545+
可以看到,最终还是用 syscall 中的 accept4 或 accept 完成了系统调用。accept4 对比 accept 的优势是,可以通过一次系统调用完成 accept 和 nonblock flag 的两个目的。而使用 accept 的话,还要手动 syscall.SetNonblock。
546546

547547
### Read 流程
548548

0 commit comments

Comments
 (0)