#include <serverprober.hpp>
Definition at line 51 of file serverprober.hpp.
◆ UDPEndpoint
◆ UDPSocket
◆ ServerProber()
Construct a prober for the already-resolved remotes in remote_list_arg, wrapping probes with the control-channel protection from proto_config_arg. Opens no socket and sends nothing; call start() to probe.
Definition at line 77 of file serverprober.hpp.
◆ ~ServerProber()
| openvpn::ServerProber::~ServerProber |
( |
| ) |
|
|
inline |
◆ finish()
| void openvpn::ServerProber::finish |
( |
| ) |
|
|
inlineprivate |
Close the probe window and hand the replies to the callback, once. No-op if stopped – an already-expired timer's handler can still reach us.
Definition at line 331 of file serverprober.hpp.
◆ gather_targets()
| void openvpn::ServerProber::gather_targets |
( |
std::vector< Target > & |
targets | ) |
|
|
inlineprivate |
Collect every resolved UDP endpoint from the remote list.
Definition at line 184 of file serverprober.hpp.
◆ handle_reply()
◆ queue_recv()
| void openvpn::ServerProber::queue_recv |
( |
const bool |
v4 | ) |
|
|
inlineprivate |
Arm the next receive on the v4 or v6 socket; re-armed after every datagram until halt, or until that socket is released (it is then gone).
Definition at line 265 of file serverprober.hpp.
◆ release_socket()
Hand off the probe socket for an address family so it can be adopted as the connection socket (source port preserved, no rebind).
The adopting transport must be its only reader, so anything we still have armed on it is cancelled. Nothing of ours re-arms behind that: queue_recv() looks the socket up by family, and it is gone once moved out.
- Returns
- the socket, or nullptr if none was opened for that family
Definition at line 150 of file serverprober.hpp.
◆ send_probe()
| void openvpn::ServerProber::send_probe |
( |
const Target & |
t | ) |
|
|
inlineprivate |
Wrap and send one SERVER_PROBE, recording the endpoint as pending.
Definition at line 234 of file serverprober.hpp.
◆ socket_for()
Lazily open (and socket_protect) the per-family socket, arming its receive.
Definition at line 207 of file serverprober.hpp.
◆ start()
Begin probing. cb->server_probe_done() fires exactly once, when the probe window elapses (or immediately if there is nothing to probe).
Definition at line 104 of file serverprober.hpp.
◆ stop()
| void openvpn::ServerProber::stop |
( |
| ) |
|
|
inline |
Cancel probing without invoking the callback. Sockets stay open (transferable).
Definition at line 127 of file serverprober.hpp.
◆ finished
| bool openvpn::ServerProber::finished = false |
|
private |
◆ halt
| bool openvpn::ServerProber::halt = false |
|
private |
◆ io_context
| openvpn_io::io_context& openvpn::ServerProber::io_context |
|
private |
◆ notify_callback
◆ pending
◆ probe_window
| Time::Duration openvpn::ServerProber::probe_window |
|
private |
◆ probe_wrap
◆ proto_config
◆ remote_list
◆ results
| std::vector<Result> openvpn::ServerProber::results |
|
private |
◆ sock_v4
| std::unique_ptr<UDPSocket> openvpn::ServerProber::sock_v4 |
|
private |
◆ sock_v6
| std::unique_ptr<UDPSocket> openvpn::ServerProber::sock_v6 |
|
private |
◆ socket_protect
◆ stats
◆ timer
The documentation for this class was generated from the following file: