enet  v1.3.12
reliable UDP networking library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
_ENetCompressor Struct Reference

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

#include <enet.h>

Collaboration diagram for _ENetCompressor:

Public Member Functions

 size_t (ENET_CALLBACK *compress)(void *context
 Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. More...
 
 size_t (ENET_CALLBACK *decompress)(void *context
 Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. More...
 
 void (ENET_CALLBACK *destroy)(void *context)
 Destroys the context when compression is disabled or the host is destroyed. More...
 

Data Fields

voidcontext
 Context data for the compressor. More...
 
const ENetBuffer size_t inBufferCount
 
const ENetBufferinBuffers
 
const enet_uint8inData
 
const ENetBuffer size_t size_t inLimit
 
const enet_uint8 size_t inLimit
 
const ENetBuffer size_t size_t
enet_uint8
outData
 
const enet_uint8 size_t
enet_uint8
outData
 
const ENetBuffer size_t size_t
enet_uint8 size_t 
outLimit
 
const enet_uint8 size_t
enet_uint8 size_t 
outLimit
 

Detailed Description

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

Member Function Documentation

_ENetCompressor::size_t ( ENET_CALLBACK compress)

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

Should return 0 on failure.

_ENetCompressor::size_t ( ENET_CALLBACK decompress)

Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes.

Should return 0 on failure.

_ENetCompressor::void ( ENET_CALLBACK destroy)

Destroys the context when compression is disabled or the host is destroyed.

May be NULL.

Field Documentation

void* _ENetCompressor::context

Context data for the compressor.

Must be non-NULL.

Referenced by enet_host_compress(), and enet_host_compress_with_range_coder().

const ENetBuffer size_t _ENetCompressor::inBufferCount
const ENetBuffer* _ENetCompressor::inBuffers
const enet_uint8* _ENetCompressor::inData
const ENetBuffer size_t size_t _ENetCompressor::inLimit
const enet_uint8 size_t _ENetCompressor::inLimit
const ENetBuffer size_t size_t enet_uint8* _ENetCompressor::outData
const enet_uint8 size_t enet_uint8* _ENetCompressor::outData
const ENetBuffer size_t size_t enet_uint8 size_t _ENetCompressor::outLimit
const enet_uint8 size_t enet_uint8 size_t _ENetCompressor::outLimit

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