Transport I/O tasklet application mux->subscribe(SUB_RECV) MUX Stream ID Stream ID tasklet_wakeup() tasklet_wakeup() mux->snd_buf() mux->rcv_buf() xprt->snd_buf(mbuf) xprt->rcv_buf(dbuf) HTX contents when mode==HTTP tasklet_wakeup() tasklet_wakeup() mux->subscribe(SUB_SEND) mux streams mux=conn->mux Transport encoding/decoding function transport layer multiplexer (MUX/DEMUX) general processing function stream buffer (byte-level FIFO) xprt->subscribe(SUB_RECV) xprt->subscribe(SUB_SEND) stconn (eg: checks, streams) connection = sc->sedesc->conn Notes: snd_buf() will move the buffer (zero-copy) when the destination is empty. - the application is also is sc->app with sc->app_ops - transport layers (xprt) are stackable. conn->xprt is the topmost one. called the app layer and - mux->rcv_buf() and encode encode encode encode decode decode decode decode mux_io_cb mux_io_cb sc_conn_io_cb channel buf rxbuf dbuf mbuf DEMUX