mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-11-26 22:55:37 +08:00
Add systemd socket activation capability
Add support for a systemd.socket activation. Socket it passed from
systemd via file descriptor (see systemd.socket doc)
Also, added a few features for convenience:
* --conn/conv-timeout options to control conversation and connection
timeouts
* --shutdown option to shutdown service after all connections are
timeouted. This is for convent usage with systemd.socket
* test script which allows to smoke test udp speeder and its
socket activation capability
* example systemd unit files
This commit is contained in:
9
examples/udp_speeder.service
Normal file
9
examples/udp_speeder.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=UDP Speeder Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/mkarpets/repos/UDPspeeder/speederv2 -s -l0.0.0.0:4096 -r127.0.0.1:7777 -f20:10 --log-level 4 --conv-timeout 10 --conn-timeout 20 --shutdown
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
9
examples/udp_speeder.socket
Normal file
9
examples/udp_speeder.socket
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=UDP Speeder Socket
|
||||
|
||||
[Socket]
|
||||
ListenDatagram=0.0.0.0:4096
|
||||
FreeBind=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Reference in New Issue
Block a user