Skip to content

关于LT触发 read和write的理解问题 #692

Answered by LunarStore
SpencerChou asked this question in Q&A
Discussion options

You must be logged in to vote

write就是先直接向fd里面写,写不完,说明发送缓冲区满了,然后剩下的字节就靠epoll异步通知写完就行了,
对于解析,采用的是状态机的形式,每次读数据都是同一个parse对象,状态机就是应对流数据的,流数据就是不可能一次性解析完的数据,建议你好好了解一下什么是状态机。

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@LunarStore
Comment options

Answer selected by SpencerChou
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants