-static int client_recv_buffer(struct client_task *ct, fd_set *rfds,
- char *buf, size_t sz, size_t *n)
-{
- int ret;
-
- if (ct->status < CL_SENT_CH_RESPONSE)
- return read_nonblock(ct->scc.fd, buf, sz, rfds, n);
-
- *n = 0;
- ret = sc_recv_buffer(&ct->scc, buf, sz);
- /*
- * sc_recv_buffer is used with blocking fds elsewhere, so it
- * does not use the nonblock-API. Therefore we need to
- * check for EOF and EAGAIN.
- */
- if (ret == 0)
- return -E_SERVER_EOF;
- if (ret == -ERRNO_TO_PARA_ERROR(EAGAIN))
- return 0;
- if (ret < 0)
- return ret;
- *n = ret;
- return 0;
-}
-
-static int send_sb(struct client_task *ct, void *buf, size_t numbytes,
+static int send_sb(struct client_task *ct, int channel, void *buf, size_t numbytes,