]> git.ozlabs.org Git - ccan/commit
ccan/io: rewrite.
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 3 Aug 2014 00:25:07 +0000 (09:55 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 3 Aug 2014 00:25:07 +0000 (09:55 +0930)
commitcdffdf5d61f8330cfc3467e73a84876eb3928e9b
tree036ab4b70f0c21fd9ccd85fc77ad083c90357c98
parent12e924346b342c61219a3fdc57eb6b00a27f1cd1
ccan/io: rewrite.

I found it difficult to use myself, particularly io_duplex().

So this removes that, as well as timers and debug (for the moment).

API changes:
1) An io_plan is passed by pointer, rather than copied on the stack.
3) All io_plans are generated using the struct io_conn.
3) tal is the allocator.
4) A new connection must be set up with a callback, so this is now the
   same as one generated from a listener.
5) io_read_partial and io_write_partial take an explicit length.
6) io_always() and io_wait() take an explit in/out arg.
7) io_break() does not return a plan.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
44 files changed:
ccan/io/_info
ccan/io/backend.h
ccan/io/io.c
ccan/io/io.h
ccan/io/io_plan.h
ccan/io/poll.c
ccan/io/test/run-01-start-finish-DEBUG.c [deleted file]
ccan/io/test/run-01-start-finish.c
ccan/io/test/run-02-read-DEBUG.c [deleted file]
ccan/io/test/run-02-read.c
ccan/io/test/run-03-readpartial-DEBUG.c [deleted file]
ccan/io/test/run-03-readpartial.c
ccan/io/test/run-04-writepartial-DEBUG.c [deleted file]
ccan/io/test/run-04-writepartial.c
ccan/io/test/run-05-write-DEBUG.c [deleted file]
ccan/io/test/run-05-write.c
ccan/io/test/run-06-idle-DEBUG.c [deleted file]
ccan/io/test/run-06-idle.c
ccan/io/test/run-07-break-DEBUG.c [deleted file]
ccan/io/test/run-07-break.c
ccan/io/test/run-08-hangup-on-idle-DEBUG.c [deleted file]
ccan/io/test/run-08-hangup-on-idle.c
ccan/io/test/run-08-read-after-hangup-DEBUG.c [deleted file]
ccan/io/test/run-08-read-after-hangup.c
ccan/io/test/run-09-connect-DEBUG.c [deleted file]
ccan/io/test/run-09-connect.c
ccan/io/test/run-10-many-DEBUG.c [deleted file]
ccan/io/test/run-10-many.c
ccan/io/test/run-12-bidir-DEBUG.c [deleted file]
ccan/io/test/run-12-bidir.c
ccan/io/test/run-13-all-idle-DEBUG.c [deleted file]
ccan/io/test/run-13-all-idle.c
ccan/io/test/run-14-duplex-both-read-DEBUG.c [deleted file]
ccan/io/test/run-14-duplex-both-read.c
ccan/io/test/run-15-timeout-DEBUG.c [deleted file]
ccan/io/test/run-15-timeout.c
ccan/io/test/run-16-duplex-test.c
ccan/io/test/run-17-homemade-io-DEBUG.c [deleted file]
ccan/io/test/run-17-homemade-io.c
ccan/io/test/run-18-errno-DEBUG.c [deleted file]
ccan/io/test/run-18-errno.c
ccan/io/test/run-19-always-DEBUG.c [deleted file]
ccan/io/test/run-19-always.c
ccan/io/test/run-set_alloc.c [deleted file]