Struct enet_sys::_ENetCompressor [] [src]

#[repr(C)]
pub struct _ENetCompressor { pub context: *mut c_void, pub compress: Option<unsafe extern "C" fn(context: *mut c_void, inBuffers: *const ENetBuffer, inBufferCount: usize, inLimit: usize, outData: *mut enet_uint8, outLimit: usize) -> usize>, pub decompress: Option<unsafe extern "C" fn(context: *mut c_void, inData: *const enet_uint8, inLimit: usize, outData: *mut enet_uint8, outLimit: usize) -> usize>, pub destroy: Option<unsafe extern "C" fn(context: *mut c_void)>, }

An ENet packet compressor for compressing UDP packets before socket sends or receives.

Fields

Context data for the compressor. Must be non-NULL.

Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure.

Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure.

Destroys the context when compression is disabled or the host is destroyed. May be NULL.

Trait Implementations

impl Debug for _ENetCompressor
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for _ENetCompressor
[src]

impl Clone for _ENetCompressor
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations