Skip to content

菜鸡有个问题没看懂... #2

Open
@hanxuan123

Description

@hanxuan123

2019-06-26 23-12-05屏幕截图
在你的第一个commit的代码中,为何直接运行/tar-demo 时候,这时候没有客户端连接,epool_wait会被触发有两个事件,先close后noify,我看到代码中这里对应着两个不同的套接字,
epoller.add(_shutdown_sock, H64(ET_CLOSE), EPOLLIN);
epoller.add(_notify_sock, H64(ET_NOTIFY), EPOLLIN);
epoller.add(_sock, H64(ET_LISTEN) | _sock, EPOLLIN);
可是除了第二个参数不同外,就没有什么不同了这里会产生什么影响码.. 还有这里为什么要用H(64)这个宏定义进行左移32位操作额,

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