Skip to main content

ProxyPlugin

Trait ProxyPlugin 

Source
pub trait ProxyPlugin: Send + Sync {
    // Required method
    fn name(&self) -> &'static str;

    // Provided methods
    fn on_session_start(&self) { ... }
    fn on_clientbound(&self, _frame: &Frame) -> Verdict { ... }
    fn on_serverbound(&self, _frame: &Frame) -> Verdict { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Provided Methods§

Source

fn on_session_start(&self)

A new session (upstream connection) has been established.

Source

fn on_clientbound(&self, _frame: &Frame) -> Verdict

Frame travelling target-server -> clients.

Source

fn on_serverbound(&self, _frame: &Frame) -> Verdict

Frame travelling controlling-client -> target server.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§