/* * Pack the arguments contained in ap into a string according to the vstrpack interface in utils.h * and send it via <dis> to <fd>. */ void disVaPack(Dispatcher *dis, int fd, va_list ap) { char *str; int n = vastrpack(&str, ap); disWrite(dis, fd, str, n); free(str); }
/* * Write the first <size> bytes of <data> to <fd>, which must be known to <ns>. You may write to * <fd> via any other means, but if you use this function the data will be written out, possibly * piece by piece but always without blocking, when the given file descriptor becomes writable. */ void nsWrite(NS *ns, int fd, const char *data, size_t size) { disWrite(&ns->dis, fd, data, size); }