8000 关于 `mread_pool->skip` 这个字段的含义 · Issue #10 · cloudwu/mread · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

关于 mread_pool->skip 这个字段的含义 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dirtysalt opened this issue Dec 28, 2019 · 0 comments
Open

关于 mread_pool->skip 这个字段的含义 #10

dirtysalt opened this issue Dec 28, 2019 · 0 comments

Comments

@dirtysalt
Copy link

代码里面有个地方,不知道是不是我理解错误:我觉得 mread_pool->skip 这个字段,感觉不应该放在 mread_pool 这个结构里面,应该是放在 struct socket里面。我理解这个字段的含义是:”当前连接读取了多少个字节,所以下次读取size的时候应该跳过这些字节"。所以这个 skip 字段应该是放在 struct socket 下面。

另外 ringbuffer_block 看上去像是一个单向链表只保持了头部,这个在 ringbuffer_link的时候会不会存在效率问题。如果client多次发送小块数据的话,感觉这个链表会特别长。(当然这个和应用场景有关,如果client是可信任的话就无所谓了)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0