From 2c7659ec930277981b6333b5b3aff7840d11933c Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 25 Oct 2026 18:51:51 +0100 Subject: Decouple config parsing from binding and worker spawning * Options are parsed now into a listener description list before binding them at once and starting the workers later * UDP workers can now be configured per connection * socket reuse is now done more sensibly, mcast sockets always reused * Hold-off logic after spawning udp workers removed --- opentracker.conf.sample | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'opentracker.conf.sample') diff --git a/opentracker.conf.sample b/opentracker.conf.sample index 054e405..4adb736 100644 --- a/opentracker.conf.sample +++ b/opentracker.conf.sample @@ -7,14 +7,8 @@ # If no listen option is given (here or on the command line), opentracker # listens on 0.0.0.0:6969 tcp and udp. # -# The next variable determines if udp sockets are handled in the event -# loop (set it to 0, the default) or are handled in blocking reads in -# dedicated worker threads. You have to set this value before the -# listen.tcp_udp or listen.udp statements before it takes effect, but you -# can re-set it for each listen statement. Normally you should keep it at -# the top of the config file. -# -# listen.udp.workers 4 +# Addresses are collected while this file is read and bound afterwards, +# so the order of the statements below does not matter. # # listen.tcp_udp 0.0.0.0 # listen.tcp_udp 192.168.0.1:80 @@ -25,6 +19,24 @@ # listen.tcp 0.0.0.0 # listen.udp 192.168.0.1:6969 # +# A listen statement takes options after the address: +# +# workers= handle this udp socket in blocking reads in that +# many dedicated worker threads instead of in the +# event loop. Ignored for tcp. +# shared allow another process to bind the same address and +# let the kernel share the traffic. Only useful if you +# deliberately run a second tracker there. +# +# listen.udp 10.0.0.5:6969 workers=4 shared +# +# The two statements below set defaults for every listen statement in +# this file that does not name the option itself. They may appear +# anywhere. +# +# listen.udp.workers 4 +# listen.shared 1 +# # Note, that using 0.0.0.0 for udp sockets may yield surprising results. # An answer packet sent on that socket will not necessarily have the # source address that the requesting client may expect, but any address -- cgit v1.3