mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
UDP services: an event loop of their own from loop.c
A UDP service's thread waited for its sockets with an epoll set of its own on Linux and poll() over every socket on each turn elsewhere. It runs a loop of loop.c now: epoll, kqueue or AFD, the sockets registered once and changed as the sessions change, everywhere. The handlers are called by the loop as a socket is ready, a datagram read before the socket is polled again; the sessions ended meanwhile are let go after the turn, as before. The deadlines keep their heap. A session is allocated with what the loop waits for, private to mainudp.c. The standalone udppm is linked with loop.c. Plugins: struct udpsession loses regctrl and regevents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a5806b70ae
commit
1201031404
4 files changed
+131
-161
No files matched your search
+1
-1
@@ -772,7 +772,7 @@ foreach(PROXY_NAME proxy socks pop3p imapp smtpp ftppr tcppm udppm tlspr)
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "udppm")
|
||||
target_sources(${PROXY_NAME} PRIVATE src/hash.c)
|
||||
target_sources(${PROXY_NAME} PRIVATE src/hash.c src/loop.c)
|
||||
endif()
|
||||
|
||||
if(PROXY_NAME STREQUAL "socks" OR PROXY_NAME STREQUAL "udppm")
|
||||
|
||||
Reference in new issue
Block a user