This one is to be used by the read I/O handlers.
#define SI_FL_CAP_SPLICE (SI_FL_CAP_SPLTCP)
+struct buffer;
struct server;
struct proxy;
struct si_applet;
void (*write)(struct connection *conn); /* write callback after poll() */
void (*close)(struct connection *); /* close the data channel on the connection */
int (*snd_buf)(struct connection *conn); /* callback used to send a buffer contents */
+ int (*rcv_buf)(struct connection *conn, struct buffer *buf, int count); /* recv callback */
};
/* A stream interface has 3 parts :
break;
}
- ret = raw_sock_to_buf(conn, &b->buf, max);
+ ret = conn->data->rcv_buf(conn, &b->buf, max);
if (ret <= 0)
break;
.read = sock_raw_read,
.write = si_conn_send_cb,
.snd_buf = sock_raw_write_loop,
+ .rcv_buf = raw_sock_to_buf,
.close = NULL,
};