REORG/MEDIUM: connection: introduce the notion of connection handle
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Aug 2017 12:31:19 +0000 (14:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Aug 2017 17:30:04 +0000 (19:30 +0200)
commit585744bf2ecf05a0761c2be10ebf866648491cd3
treec2d086b9e9e28d49daf8242fd85a75d88ff7dcd5
parentee1bdd5a036117e9d038ee6338f206fc9294d523
REORG/MEDIUM: connection: introduce the notion of connection handle

Till now connections used to rely exclusively on file descriptors. It
was planned in the past that alternative solutions would be implemented,
leading to member "union t" presenting sock.fd only for now.

With QUIC, the connection will need to continue to exist but will not
rely on a file descriptor but a connection ID.

So this patch introduces a "connection handle" which is either a file
descriptor or a connection ID, to replace the existing "union t". We've
now removed the intermediate "struct sock" which was never used. There
is no functional change at all, though the struct connection was inflated
by 32 bits on 64-bit platforms due to alignment.
14 files changed:
include/proto/connection.h
include/types/connection.h
src/checks.c
src/cli.c
src/connection.c
src/frontend.c
src/hlua.c
src/proto_http.c
src/proto_tcp.c
src/proto_uxst.c
src/raw_sock.c
src/session.c
src/ssl_sock.c
src/stream.c