* include/types/stream_interface.h
* This file describes the stream_interface struct and associated constants.
*
- * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2014 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <stdlib.h>
#include <sys/socket.h>
-#include <types/channel.h>
-#include <types/connection.h>
#include <types/hlua.h>
#include <types/obj_type.h>
#include <common/config.h>
enum si_state prev_state;/* SI_ST*, copy of previous state */
unsigned short flags; /* SI_FL_* */
unsigned int exp; /* wake up time for connect, queue, turn-around, ... */
- struct channel *ib, *ob; /* input and output buffers */
void *owner; /* generally a (struct task*) */
enum obj_type *end; /* points to the end point (connection or appctx) */
struct si_ops *ops; /* general operations at the stream interface layer */
socket->s->res.prod = &socket->s->si[1];
socket->s->res.cons = &socket->s->si[0];
- socket->s->si[0].ib = &socket->s->req;
- socket->s->si[0].ob = &socket->s->res;
-
- socket->s->si[1].ib = &socket->s->res;
- socket->s->si[1].ob = &socket->s->req;
-
socket->s->req.analysers = 0;
socket->s->req.rto = socket_proxy.timeout.client;
socket->s->req.wto = socket_proxy.timeout.server;
channel_init(&s->req);
s->req.prod = &s->si[0];
s->req.cons = &s->si[1];
- s->si[0].ib = s->si[1].ob = &s->req;
s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected */
channel_init(&s->res);
s->res.prod = &s->si[1];
s->res.cons = &s->si[0];
- s->si[0].ob = s->si[1].ib = &s->res;
s->res.rto = s->be->timeout.server;
s->res.wto = s->fe->timeout.client;
channel_init(&s->req);
s->req.prod = &s->si[0];
s->req.cons = &s->si[1];
- s->si[0].ib = s->si[1].ob = &s->req;
s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected */
/* activate default analysers enabled for this listener */
channel_init(&s->res);
s->res.prod = &s->si[1];
s->res.cons = &s->si[0];
- s->si[0].ob = s->si[1].ib = &s->res;
s->res.analysers = 0;
if (s->fe->options2 & PR_O2_NODELAY) {