]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: protocol: add a default I/O callback and put it into the receiver
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:22:29 +0000 (21:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:47:56 +0000 (21:47 +0200)
commitd2fb99f9d5b99bf469119e28c7c3859b69134cbf
tree815db576ec3bad99854c47c5c7e1301ec5b0c75d
parentcaa91de7184fd3f1c49204fc5a234b36e23142a2
MINOR: protocol: add a default I/O callback and put it into the receiver

For now we're still using the protocol's default accept() function as
the I/O callback registered by the receiver into the poller. While
this is usable for most TCP connections where a listener is needed,
this is not suitable for UDP where a different handler is needed.

Let's make this configurable in the receiver just like the upper layer
is configurable for listeners. In order to ease stream protocols
handling, the protocols will now provide a default I/O callback
which will be preset into the receivers upon allocation so that
almost none of them has to deal with it.
include/haproxy/protocol-t.h
include/haproxy/receiver-t.h
src/listener.c