mirror of
https://github.com/3proxy/3proxy.git
synced 2026-10-28 22:05:48 +08:00
|
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
The loop went through every session three times a turn: for the nearest deadline, to register its sockets with epoll, and for the deadlines come and the sessions ended. A datagram cost as much as the sessions there were, idle ones too. - The deadlines are in a binary heap, the nearest at its top: the wait is until the top, and the sessions timed out are taken from the top down to the first not due. A datagram only moves a session's deadline later, which leaves the heap as it is: the session is looked at again when its old deadline comes, and put back where its deadline is then, once in its timeout however many datagrams it had. A deadline set earlier by a handler goes up the heap. - A session ended is put on a list and let go at the end of the turn, and its sockets are registered with epoll after the loop or a handler had it, not every session every turn. - Deadlines are milliseconds of monotime(), CLOCK_MONOTONIC (the performance counter on Windows), which the time of day being set does not move: before, a clock set back kept sessions for as long, and one set forward ended them all. The loop reads it once a turn, in u->now. With epoll, a datagram costs the same with 20000 idle sessions as with none (38-40 us of the proxy's CPU a round trip, ARM), where it took 59 before. poll() elsewhere still builds its set every turn. Tests: a session heard from every half second lives through two seconds of idle timeout, and ends two seconds after the last datagram. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| admin.py | ||
| auto.py | ||
| counters.py | ||
| dnspr.py | ||
| httpsrv_auth.py | ||
| httpsrv_files.py | ||
| httpsrv_keepalive.py | ||
| httpsrv_ops.py | ||
| httpsrv_parsing.py | ||
| httpsrv_proxypass.py | ||
| httpsrv_rules.py | ||
| ipv6.py | ||
| ktls.py | ||
| maxconn.py | ||
| parent_failover.py | ||
| parent_ports.py | ||
| parent_weights.py | ||
| pcre.py | ||
| portmap.py | ||
| proxy_headers.py | ||
| proxy_http.py | ||
| reattach.py | ||
| reload.py | ||
| socks.py | ||
| splice.py | ||
| ssl.py | ||
| sysdns.py | ||
| takeover.py | ||
| timeouts.py | ||
| tlspr.py | ||
| transparent.py | ||
| udploop.py | ||
| unixsock.py | ||