This allows an application to call connect() in an async fashion. Like other opcodes, we first try a non-blocking connect, then punt to async context if we have to. Note that we can still return -EINPROGRESS, and in that case the caller should use IORING_OP_POLL_ADD to do an async wait for completion of the connect request (just like for regular connect(2), except we can do it async here too).
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -73,6 +73,7 @@ struct io_uring_sqe { · 72 unmodified lines | |||
| 73 | #define IORING_OP_ACCEPT 13 | 73 | #define IORING_OP_ACCEPT 13 |
| 74 | #define IORING_OP_ASYNC_CANCEL 14 | 74 | #define IORING_OP_ASYNC_CANCEL 14 |
| 75 | #define IORING_OP_LINK_TIMEOUT 15 | 75 | #define IORING_OP_LINK_TIMEOUT 15 |
| 76 | #define IORING_OP_CONNECT 16 | ||
| 76 | 77 | ||
| 77 | /* | 78 | /* |
| 78 | * sqe->fsync_flags | 79 | * sqe->fsync_flags |