ScummVM API documentation
_ENetCompressor Struct Reference

#include <enet.h>

Public Attributes

void * context
 
size_t(* compress )(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)
 
size_t(* decompress )(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)
 
void(* destroy )(void *context)
 

Detailed Description

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

Member Data Documentation

◆ context

void* _ENetCompressor::context

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

◆ compress

size_t( * _ENetCompressor::compress) (void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)

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

◆ decompress

size_t( * _ENetCompressor::decompress) (void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)

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

◆ destroy

void( * _ENetCompressor::destroy) (void *context)

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


The documentation for this struct was generated from the following file: