- NEXT, /* eg starting, woken from idle, return from io_break. */
- IDLE,
- FINISHED,
- PROCESSING /* We expect them to change this now. */
-};
-
-static inline enum io_state from_ioplan(struct io_plan *op)
-{
- return (enum io_state)(long)op;
-}
-
-struct io_state_read {
- char *buf;
- size_t len;
-};
-
-struct io_state_write {
- const char *buf;
- size_t len;
-};
-
-struct io_state_readpart {
- char *buf;
- size_t *lenp;
-};
-
-struct io_state_writepart {
- const char *buf;
- size_t *lenp;
-};
-
-struct io_timeout {
- struct timer timer;
- struct io_conn *conn;
-
- struct io_plan *(*next)(struct io_conn *, void *arg);
- void *next_arg;
+ /* These are for connections we create. */
+ struct io_plan *(*init)(struct io_conn *conn, void *arg);
+ void *arg;