]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] frontend: split accept() into frontend_accept() and session_accept()
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Jun 2010 15:45:26 +0000 (17:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 08:53:17 +0000 (10:53 +0200)
commit81f9aa3bf23f9dafe42a961dd0b2111cc713eacb
treecea81c080641d776b81d3f4c3d3b46bcbdccb01b
parentf229eb8f8f7d638d07ec1993be3754abc485aff0
[MAJOR] frontend: split accept() into frontend_accept() and session_accept()

A new function session_accept() is now called from the lower layer to
instanciate a new session. Once the session is instanciated, the upper
layer's frontent_accept() is called. This one can be service-dependant.

That way, we have a 3-phase accept() sequence :
  1) protocol-specific, session-less accept(), which is pointed to by
     the listener. It defaults to the generic stream_sock_accept().
  2) session_accept() which relies on a frontend but not necessarily
     for use in a proxy (eg: stats or any future service).
  3) frontend_accept() which performs the accept for the service
     offerred by the frontend. It defaults to frontend_accept() which
     is really what is used by a proxy.

The TCP/HTTP proxies have been moved to this mode so that we can now rely on
frontend_accept() for any type of session initialization relying on a frontend.

The next step will be to convert the stats to use the same system for the stats.
include/proto/frontend.h
include/proto/session.h
src/cfgparse.c
src/frontend.c
src/session.c