Link dup2 to proxy
This commit is contained in:
parent
093face009
commit
260e1810ba
1 changed files with 11 additions and 5 deletions
16
src/proxy.h
16
src/proxy.h
|
@ -22,6 +22,12 @@ int algo_rr_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo
|
||||||
int algo_rr_on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo);
|
int algo_rr_on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo);
|
||||||
int algo_rr_on_err(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo);
|
int algo_rr_on_err(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo);
|
||||||
|
|
||||||
|
void algo_dup2_init(struct evt_core_ctx* ctx, struct algo_ctx* app_ctx, struct algo_params* ap);
|
||||||
|
int algo_dup2_on_stream(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buffer_packet* bp);
|
||||||
|
int algo_dup2_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buffer_packet* bp);
|
||||||
|
int algo_dup2_on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo);
|
||||||
|
int algo_dup2_on_err(struct evt_core_ctx *ctx, struct evt_core_fdinfo *fdinfo);
|
||||||
|
|
||||||
static struct algo_desc available_algo[] = {
|
static struct algo_desc available_algo[] = {
|
||||||
{
|
{
|
||||||
.name = "naive",
|
.name = "naive",
|
||||||
|
@ -41,11 +47,11 @@ static struct algo_desc available_algo[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "dup2",
|
.name = "dup2",
|
||||||
.init = NULL,
|
.init = algo_dup2_init,
|
||||||
.on_stream = NULL,
|
.on_stream = algo_dup2_on_stream,
|
||||||
.on_datagram = NULL,
|
.on_datagram = algo_dup2_on_datagram,
|
||||||
.on_timer = NULL,
|
.on_timer = algo_dup2_on_timer,
|
||||||
.on_err = NULL
|
.on_err = algo_dup2_on_err
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue