- 论坛徽章:
- 3
|
本帖最后由 hanxin83 于 2015-12-08 11:01 编辑
补充一个, 异步connect还会直接返回成功....(在连接本机IP的情况下)
PS, 没碰到过EPOLLHUP|EPOLLOUT楼主的情况.......- +--------------------------------------------------------------------------+
- | I/O events |
- +-----------+-----------+--------------------------------------------------+
- |Event | Poll flag | Occurrence |
- +-----------+-----------+--------------------------------------------------+
- |Read | POLLIN | New data arrived. |
- +-----------+-----------+--------------------------------------------------+
- |Read | POLLIN | A connection setup has been completed (for con- |
- | | | nection-oriented sockets) |
- +-----------+-----------+--------------------------------------------------+
- |Read | POLLHUP | A disconnection request has been initiated by |
- | | | the other end. |
- +-----------+-----------+--------------------------------------------------+
- |Read | POLLHUP | A connection is broken (only for connection-ori- |
- | | | ented protocols). When the socket is written |
- | | | SIGPIPE is also sent. |
- +-----------+-----------+--------------------------------------------------+
- |Write | POLLOUT | Socket has enough send buffer space for writing |
- | | | new data. |
- +-----------+-----------+--------------------------------------------------+
- |Read/Write | POLLIN| | An outgoing connect(2) finished. |
- | | POLLOUT | |
- +-----------+-----------+--------------------------------------------------+
- |Read/Write | POLLERR | An asynchronous error occurred. |
- +-----------+-----------+--------------------------------------------------+
- |Read/Write | POLLHUP | The other end has shut down one direction. |
- +-----------+-----------+--------------------------------------------------+
- |Exception | POLLPRI | Urgent data arrived. SIGURG is sent then. |
- +-----------+-----------+--------------------------------------------------+
复制代码 |
|