return bufchain_size(&s->output_data);
static void sk_tcp_write(Socket sock, char *buf, int len){    Actual_Socket s = (Actual_Socket) sock;    /*     * Add the data to the buffer list on the socket.     */    if (s->tail && s->tail->buflen < BUFFER_GRANULE) {	int copylen = min(len, BUFFER_GRANULE - s->tail->buflen);	memcpy(s->tail->buf + s->tail->buflen, buf, copylen);	buf += copylen;	len -= copylen;	s->tail->buflen += copylen;    }    while (len > 0) {	int grainlen = min(len, BUFFER_GRANULE);	struct buffer *newbuf;	newbuf = smalloc(sizeof(struct buffer));	newbuf->bufpos = 0;	newbuf->buflen = grainlen;	memcpy(newbuf->buf, buf, grainlen);	buf += grainlen;	len -= grainlen;	if (s->tail)	    s->tail->next = newbuf;	else	    s->head = s->tail = newbuf;	newbuf->next = NULL;	s->tail = newbuf;    }    /*     * Now try sending from the start of the buffer list.     */    if (s->writable)	try_send(s);}