enet: _ENetCompressor Struct Reference

enet

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
_ENetCompressor Struct Reference

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

`#include <enet.h>`

## 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
void * | context
| Context data for the compressor. More...
const ENetBuffer * | inBuffers
const ENetBuffer size_t | inBufferCount
const ENetBuffer size_t size_t | inLimit
const ENetBuffer size_t size_t enet_uint8 * | outData
const ENetBuffer size_t size_t enet_uint8 size_t | outLimit
const enet_uint8 * | inData
const enet_uint8 size_t | inLimit
const enet_uint8 size_t enet_uint8 * | outData
const enet_uint8 size_t enet_uint8 size_t | outLimit

## Member Function Documentation

_ENetCompressor::size_t | ( | ENET_CALLBACK * | compress | ) |

Should return 0 on failure.

_ENetCompressor::size_t | ( | ENET_CALLBACK * | decompress | ) |

Should return 0 on failure.

_ENetCompressor::void | ( | ENET_CALLBACK * | destroy | ) |

May be NULL.

## Field Documentation

void* _ENetCompressor::context

Must be non-NULL.

Referenced by enet_host_compress(), and enet_host_compress_with_range_coder().

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

- enet.h