pub trait CloudflaredHandler: Send + Sync {
// Required method
fn update_configuration(
&self,
version: i32,
configuration: &[u8],
) -> UpdateConfigurationResponse;
// Provided methods
fn register_udp_session(
&self,
_session_identifier: &[u8; 16],
_destination_ip: &[u8],
_destination_port: u16,
) -> RegisterUdpSessionResponse { ... }
fn unregister_udp_session(
&self,
_session_identifier: &[u8; 16],
_message: &str,
) { ... }
}Expand description
Handlers for the RPC calls the edge makes on the connector.
Required Methods§
Sourcefn update_configuration(
&self,
version: i32,
configuration: &[u8],
) -> UpdateConfigurationResponse
fn update_configuration( &self, version: i32, configuration: &[u8], ) -> UpdateConfigurationResponse
Applies a remotely-managed configuration push from the edge.
Provided Methods§
Sourcefn register_udp_session(
&self,
_session_identifier: &[u8; 16],
_destination_ip: &[u8],
_destination_port: u16,
) -> RegisterUdpSessionResponse
fn register_udp_session( &self, _session_identifier: &[u8; 16], _destination_ip: &[u8], _destination_port: u16, ) -> RegisterUdpSessionResponse
Registers a UDP session for QUIC datagrams. libcfd does not support this; the default replies with an error.
Sourcefn unregister_udp_session(&self, _session_identifier: &[u8; 16], _message: &str)
fn unregister_udp_session(&self, _session_identifier: &[u8; 16], _message: &str)
Unregisters a UDP session. No-op by default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".