return NULL;
}
-/* Returns the mux ops of the connection from a cs if the endpoint is a
+/* Returns the mux ops of the connection from an stconn if the endpoint is a
* mux stream. Otherwise NULL is returned.
*/
-static inline const struct mux_ops *cs_conn_mux(const struct stconn *cs)
+static inline const struct mux_ops *sc_mux_ops(const struct stconn *cs)
{
const struct connection *conn = sc_conn(cs);
return;
/* clean data-layer shutdown */
- mux = cs_conn_mux(cs);
+ mux = sc_mux_ops(cs);
if (mux && mux->shutr)
mux->shutr(cs, mode);
sc_ep_set(cs, (mode == CO_SHR_DRAIN) ? SE_FL_SHRD : SE_FL_SHRR);
return;
/* clean data-layer shutdown */
- mux = cs_conn_mux(cs);
+ mux = sc_mux_ops(cs);
if (mux && mux->shutw)
mux->shutw(cs, mode);
sc_ep_set(cs, (mode == CO_SHW_NORMAL) ? SE_FL_SHWN : SE_FL_SHWS);
if (!cs_state_in(cs->state, SC_SB_RDY|SC_SB_EST))
return 0;
- if (!cs_conn_mux(cs))
+ if (!sc_mux_ops(cs))
return 0; // only stconns are supported
if (cs->wait_event.events & SUB_RETRY_RECV)
if (!cs_state_in(cs->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
return;
- if (!cs_conn_mux(cs))
+ if (!sc_mux_ops(cs))
return;
cs_conn_send(cs);
int stream_upgrade_from_cs(struct stconn *cs, struct buffer *input)
{
struct stream *s = __sc_strm(cs);
- const struct mux_ops *mux = cs_conn_mux(cs);
+ const struct mux_ops *mux = sc_mux_ops(cs);
if (mux) {
if (mux->flags & MX_FL_HTX)
if (sc_ep_test(cs, SE_FL_WEBSOCKET))
s->flags |= SF_WEBSOCKET;
if (sc_conn(cs)) {
- const struct mux_ops *mux = cs_conn_mux(cs);
+ const struct mux_ops *mux = sc_mux_ops(cs);
if (mux && mux->flags & MX_FL_HTX)
s->flags |= SF_HTX;