Do flow-specific setsockopt() before accept()

This commit is contained in:
Ian Gulliver
2016-02-29 22:17:37 -08:00
parent a093b8a1b6
commit b6a582e95a
8 changed files with 43 additions and 32 deletions

View File

@@ -6,15 +6,13 @@
struct buf;
struct peer;
typedef void (*flow_bound_socket_init)(int);
typedef void (*flow_new)(int, void *, struct peer *);
typedef void (*flow_get_hello)(struct buf **, void *);
struct flow {
const char *name;
flow_bound_socket_init bound_socket_init;
flow_new new;
flow_get_hello get_hello;
void (*socket_connected)(int);
void (*new)(int, void *, struct peer *);
void (*get_hello)(struct buf **, void *);
uint32_t *ref_count;
};
void flow_socket_connected(int, struct flow *);
bool flow_hello(int, struct flow *, void *);