]> git.ozlabs.org Git - ccan/commit
ccan/io: initialize connection with an explicit I/O plan.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 14 Oct 2013 10:58:36 +0000 (21:28 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 14 Oct 2013 10:58:36 +0000 (21:28 +1030)
commit57d9d1be33905691ec756b14b066181ca6850ced
treeecf0bfe3262b83258a9a6631fb44bc0f2ce79a01
parent737705f0c2ec60ea5b51ca55299488d86db37b5d
ccan/io: initialize connection with an explicit I/O plan.

Rather than going via a callback, which tends to just set up I/O, do
any setup before the call to io_new_conn(), then pass it the io_plan
directly.

The patch shows how much this simplifies our test code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
18 files changed:
ccan/io/_info
ccan/io/benchmarks/run-different-speed.c
ccan/io/benchmarks/run-length-prefix.c
ccan/io/benchmarks/run-loop.c
ccan/io/io.c
ccan/io/io.h
ccan/io/poll.c
ccan/io/test/run-01-start-finish.c
ccan/io/test/run-02-read.c
ccan/io/test/run-03-readpartial.c
ccan/io/test/run-04-writepartial.c
ccan/io/test/run-05-write.c
ccan/io/test/run-06-idle.c
ccan/io/test/run-07-break.c
ccan/io/test/run-10-many.c
ccan/io/test/run-12-bidir.c
ccan/io/test/run-13-all-idle.c
ccan/io/test/run-15-timeout.c