projects
/
ccan
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ccan/io: make io functions more generic.
[ccan]
/
ccan
/
io
/
io.h
diff --git
a/ccan/io/io.h
b/ccan/io/io.h
index cbd2b9be248b803daec99586001892e6e4e716c9..b7249e3a6b916a4ac966b77d81d00e244fd64319 100644
(file)
--- a/
ccan/io/io.h
+++ b/
ccan/io/io.h
@@
-28,12
+28,6
@@
struct io_state_writepart {
size_t *lenp;
};
size_t *lenp;
};
-enum io_result {
- RESULT_AGAIN,
- RESULT_FINISHED,
- RESULT_CLOSE
-};
-
/**
* struct io_plan - returned from a setup function.
*
/**
* struct io_plan - returned from a setup function.
*
@@
-42,7
+36,7
@@
enum io_result {
struct io_plan {
int pollflag;
/* Only NULL if idle. */
struct io_plan {
int pollflag;
/* Only NULL if idle. */
-
enum io_result (*io)(struct io_conn *con
n);
+
bool (*io)(int fd, struct io_plan *pla
n);
/* Only NULL if closing. */
struct io_plan (*next)(struct io_conn *, void *arg);
void *next_arg;
/* Only NULL if closing. */
struct io_plan (*next)(struct io_conn *, void *arg);
void *next_arg;