both
struct both *both = arg;
both->nread += len;
if (event_add(&both->ev, NULL) == -1)
struct both *both = arg;
if (len > both->nread)
len = both->nread;
both->nread -= len;
if (event_add(&both->ev, NULL) == -1)
struct both r1, r2, w1, w2;