Skip to content

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

@dirtysalt

Description

@dirtysalt

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions