Move fd flow code into flow.c

This commit is contained in:
Ian Gulliver
2016-03-02 19:16:23 -08:00
parent 896874e9d7
commit 20bc50795d
5 changed files with 12 additions and 12 deletions

View File

@@ -23,3 +23,11 @@ bool flow_hello(int fd, struct flow *flow, void *passthrough) {
}
return (write(fd, buf_at(buf_ptr, 0), buf_ptr->length) == (ssize_t) buf_ptr->length);
}
bool flow_new(int fd, struct flow *flow, void *passthrough) {
if (!flow_hello(fd, flow, passthrough)) {
return false;
}
flow->new(fd, passthrough, NULL);
return true;
}