Commit 21c18269 authored by Niels Möller's avatar Niels Möller
Browse files

A read-handlers now returns a new handler for the file (or itself).

Rev: src/abstract_io.h:1.2
parent 4d44e8d2
...@@ -20,10 +20,12 @@ struct abstract_read ...@@ -20,10 +20,12 @@ struct abstract_read
struct read_handler struct read_handler
{ {
int (*handler)(struct read_handler *closure, struct read_handler (*handler)(struct read_handler *closure,
struct abstract_read *read); struct abstract_read *read);
}; };
#define READ_HANDLER(handler, read) ((handler)->handler((handler), (read)))
struct abstract_write; struct abstract_write;
typedef int (*abstract_write_f)(struct abstract_write *closure, typedef int (*abstract_write_f)(struct abstract_write *closure,
struct lsh_string *packet); struct lsh_string *packet);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment