-#define io_duplex(conn, start, finish, arg) \
- io_duplex_((conn), \
- typesafe_cb_preargs(struct io_plan, void *, \
- (start), (arg), struct io_conn *), \
- typesafe_cb_preargs(void, void *, (finish), (arg), \
- struct io_conn *), \
- (arg))
-
-struct io_conn *io_duplex_(struct io_conn *conn,
- struct io_plan (*start)(struct io_conn *, void *),
- void (*finish)(struct io_conn *, void *),
- void *arg);
+#define io_duplex(conn, plan) \
+ (io_plan_other(), io_duplex_((conn), (plan)))
+struct io_conn *io_duplex_(struct io_conn *conn, struct io_plan plan);