Trait cobalt::PacketModifier [] [src]

pub trait PacketModifier {
    fn new(_: Config) -> Self
    where
        Self: Sized
; fn outgoing(&mut self, _: &[u8]) -> Option<Vec<u8>> { ... } fn incoming(&mut self, _: &[u8]) -> Option<Vec<u8>> { ... } }

Trait describing optional per-packet payload modification logic.

Required Methods

Method that constructs a new packet modifier using the provided configuration.

Provided Methods

Method that is called for payload modification before a packet is send over a connection's underlying socket.

The default implementation does not actually perform any kind of modification and leaves the payload to be send untouched.

Method that is called for payload modification purposes after a packet is received over a connection's underlying socket.

The default implementation does not actually perform any kind of modification and returns leaves received payload untouched.

Trait Implementations

impl Debug for PacketModifier
[src]

Formats the value using the given formatter.

Implementors