plug_sent(ps->plug, bufsize);
}
-static int plug_proxy_accepting (Plug p, OSSocket sock)
+static int plug_proxy_accepting(Plug p,
+ accept_fn_t constructor, accept_ctx_t ctx)
{
Proxy_Plug pp = (Proxy_Plug) p;
Proxy_Socket ps = pp->proxy_socket;
if (ps->state != PROXY_STATE_ACTIVE) {
- ps->accepting_sock = sock;
+ ps->accepting_constructor = constructor;
+ ps->accepting_ctx = ctx;
return ps->negotiate(ps, PROXY_CHANGE_ACCEPTING);
}
- return plug_accepting(ps->plug, sock);
+ return plug_accepting(ps->plug, constructor, ctx);
}
/*
* what should we do? close the socket with an appropriate
* error message?
*/
- return plug_accepting(p->plug, p->accepting_sock);
+ return plug_accepting(p->plug,
+ p->accepting_constructor, p->accepting_ctx);
}
if (change == PROXY_CHANGE_RECEIVE) {
* what should we do? close the socket with an appropriate
* error message?
*/
- return plug_accepting(p->plug, p->accepting_sock);
+ return plug_accepting(p->plug,
+ p->accepting_constructor, p->accepting_ctx);
}
if (change == PROXY_CHANGE_RECEIVE) {
* what should we do? close the socket with an appropriate
* error message?
*/
- return plug_accepting(p->plug, p->accepting_sock);
+ return plug_accepting(p->plug,
+ p->accepting_constructor, p->accepting_ctx);
}
if (change == PROXY_CHANGE_RECEIVE) {
* what should we do? close the socket with an appropriate
* error message?
*/
- return plug_accepting(p->plug, p->accepting_sock);
+ return plug_accepting(p->plug,
+ p->accepting_constructor, p->accepting_ctx);
}
if (change == PROXY_CHANGE_RECEIVE) {