MEDIUM: listener: implement a per-protocol pause() function
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Jul 2014 18:22:12 +0000 (20:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Jul 2014 23:13:34 +0000 (01:13 +0200)
commit092d865c53de80afc847c5ff0a079b414041ce2a
tree828cc108e4ed341801b1fb2e0cd9ba077390dbca
parent3c5efa2b3268f31cffc2c18887010d4bc906a066
MEDIUM: listener: implement a per-protocol pause() function

In order to fix the abstact socket pause mechanism during soft restarts,
we'll need to proceed differently depending on the socket protocol. The
pause_listener() function already supports some protocol-specific handling
for the TCP case.

This commit makes this cleaner by adding a new ->pause() function to the
protocol struct, which, if defined, may be used to pause a listener of a
given protocol.

For now, only TCP has been adapted, with the specific code moved from
pause_listener() to tcp_pause_listener().
include/proto/proto_tcp.h
include/types/protocol.h
src/listener.c
src/proto_tcp.c