io: add io_flush_sync().
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Mar 2017 01:45:19 +0000 (12:15 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Mar 2017 01:51:53 +0000 (12:21 +1030)
commit4f6d604ce616e70659b8494fd41ecd41e8fca30a
treec2a3e652cb9a9e7b2022ca3c94ceb3f635e0455d
parentbcca516976312896eca1b0def6d3557d192baa89
io: add io_flush_sync().

This is needed for emergency handling in lightningd: we want to output
a (fatal) error packet on the socket, but we don't want to do so in the middle
of another packet.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/io.c
ccan/io/io.h
ccan/io/test/run-30-io_flush_sync.c [new file with mode: 0644]