mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-30 18:13:32 +00:00
MINOR: udp: export udp_suspend_receiver() and udp_resume_receiver()
QUIC will rely on UDP at the receiver level, and will need these functions to suspend/resume the receivers. In the future, protocol chaining may simplify this.
This commit is contained in:
parent
c14e7ae744
commit
29885f0308
@ -28,6 +28,8 @@ extern struct protocol proto_udp4;
|
|||||||
extern struct protocol proto_udp6;
|
extern struct protocol proto_udp6;
|
||||||
|
|
||||||
int udp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote);
|
int udp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote);
|
||||||
|
int udp_suspend_receiver(struct receiver *rx);
|
||||||
|
int udp_resume_receiver(struct receiver *rx);
|
||||||
|
|
||||||
#endif /* _PROTO_PROTO_UDP_H */
|
#endif /* _PROTO_PROTO_UDP_H */
|
||||||
|
|
||||||
|
@ -41,8 +41,6 @@
|
|||||||
#include <haproxy/task.h>
|
#include <haproxy/task.h>
|
||||||
|
|
||||||
static int udp_bind_listener(struct listener *listener, char *errmsg, int errlen);
|
static int udp_bind_listener(struct listener *listener, char *errmsg, int errlen);
|
||||||
static int udp_suspend_receiver(struct receiver *rx);
|
|
||||||
static int udp_resume_receiver(struct receiver *rx);
|
|
||||||
static void udp_enable_listener(struct listener *listener);
|
static void udp_enable_listener(struct listener *listener);
|
||||||
static void udp_disable_listener(struct listener *listener);
|
static void udp_disable_listener(struct listener *listener);
|
||||||
|
|
||||||
@ -178,7 +176,7 @@ static void udp_disable_listener(struct listener *l)
|
|||||||
* to do this is to connect to any address that is reachable and will not be
|
* to do this is to connect to any address that is reachable and will not be
|
||||||
* used by regular traffic, and a great one is reconnecting to self.
|
* used by regular traffic, and a great one is reconnecting to self.
|
||||||
*/
|
*/
|
||||||
static int udp_suspend_receiver(struct receiver *rx)
|
int udp_suspend_receiver(struct receiver *rx)
|
||||||
{
|
{
|
||||||
struct sockaddr_storage ss;
|
struct sockaddr_storage ss;
|
||||||
socklen_t len = sizeof(ss);
|
socklen_t len = sizeof(ss);
|
||||||
@ -209,7 +207,7 @@ static int udp_suspend_receiver(struct receiver *rx)
|
|||||||
* connecting to AF_UNSPEC. The association breaks and the socket starts to
|
* connecting to AF_UNSPEC. The association breaks and the socket starts to
|
||||||
* receive from everywhere again.
|
* receive from everywhere again.
|
||||||
*/
|
*/
|
||||||
static int udp_resume_receiver(struct receiver *rx)
|
int udp_resume_receiver(struct receiver *rx)
|
||||||
{
|
{
|
||||||
const struct sockaddr sa = { .sa_family = AF_UNSPEC };
|
const struct sockaddr sa = { .sa_family = AF_UNSPEC };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user