X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/17ded99b880a9d546bd3d9ac3106c7da558fda4e..86c9bc4bc9e9b99482bcc5a2c6da8f5ec7516f69:/fwd.h diff --git a/fwd.h b/fwd.h index 6c16fb6..2d139e4 100644 --- a/fwd.h +++ b/fwd.h @@ -154,6 +154,7 @@ typedef struct chan { unsigned base, len; /* Base and length of data */ unsigned f; /* Various interesting flags */ void (*func)(void */*p*/); /* Function to call on closure */ + int err; /* What's wrong with the channel */ void *p; /* Argument to pass function */ sel_file r, w; /* Reader and writer selectors */ char buf[CHAN_BUFSZ]; /* The actual data buffer */ @@ -891,13 +892,21 @@ extern void endpt_killall(void); * * Arguments: @endpt *a@ = pointer to first endpoint * @endpt *b@ = pointer to second endpoint + * @const char *desc@ = description of connection * * Returns: --- * - * Use: Joins two endpoints together. + * Use: Joins two endpoints together. It's OK to join endpoints + * which are already joined; in fact, the the right thing to do + * when your endpoint decides that it's not pending any more is + * to join it to its partner again. + * + * If the endpoints are already connected then the description + * string is ignored. The endpoint manager takes a copy of + * the string, so you don't need to keep it around. */ -extern void endpt_join(endpt */*a*/, endpt */*b*/); +extern void endpt_join(endpt */*a*/, endpt */*b*/, const char */*desc*/); /* --- @source_add@ --- * *