#include <util/basicDefs.h>
#include <zlib.h>
Include dependency graph for xmlBlasterZlib.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | XmlBlasterZlibWriteBuffers |
Helper struct to compress a byte buffer before putting it into the socket. More... | |
struct | XmlBlasterZlibReadBuffers |
Helper struct to uncompress a byte buffer coming from the socket connection. More... | |
Defines | |
#define | XMLBLASTER_ZLIB_WRITE_COMPBUFFER_LEN 20000 |
#define | XMLBLASTER_ZLIB_READ_COMPBUFFER_LEN 20000 |
Functions | |
int | xmlBlaster_initZlibWriter (XmlBlasterZlibWriteBuffers *zlibWriteBufP) |
Call only once for a socket connection stream. | |
ssize_t | xmlBlaster_writenCompressed (XmlBlasterZlibWriteBuffers *zlibWriteBufP, int fd, char *ptr, size_tnbytes) |
Compress given bytes with zlib and write them to the socket. | |
int | xmlBlaster_endZlibWriter (XmlBlasterZlibWriteBuffers *zlibWriteBufP) |
| |
int | xmlBlaster_initZlibReader (XmlBlasterZlibReadBuffers *zlibReadBufP) |
Call only once for a socket connection stream. | |
ssize_t | xmlBlaster_readnCompressed (XmlBlasterZlibReadBuffers *zlibReadBufP, int fd, char *ptr, size_t nbytes, XmlBlasterNumReadFunc fpNumRead, void *userP2) |
Read compressed data from the socket and uncompress it. | |
int | xmlBlaster_endZlibReader (XmlBlasterZlibReadBuffers *zlibReadBufP) |
Cleanup after socket is closed. |
#define XMLBLASTER_ZLIB_READ_COMPBUFFER_LEN 20000 |
#define XMLBLASTER_ZLIB_WRITE_COMPBUFFER_LEN 20000 |
int xmlBlaster_endZlibReader | ( | XmlBlasterZlibReadBuffers * | zlibReadBufP | ) |
Cleanup after socket is closed.
zlibReadBufP | Struct holding necessary variables to use zlib |
Definition at line 281 of file xmlBlasterZlib.c.
References XmlBlasterZlibReadBuffers::c_stream.
Referenced by freeXmlBlasterConnectionUnparsed().
int xmlBlaster_endZlibWriter | ( | XmlBlasterZlibWriteBuffers * | zlibWriteBufP | ) |
Definition at line 149 of file xmlBlasterZlib.c.
References XmlBlasterZlibWriteBuffers::c_stream, XmlBlasterZlibWriteBuffers::debug, and dumpZlib().
Referenced by freeXmlBlasterConnectionUnparsed().
Here is the call graph for this function:
int xmlBlaster_initZlibReader | ( | XmlBlasterZlibReadBuffers * | zlibReadBufP | ) |
Call only once for a socket connection stream.
Definition at line 166 of file xmlBlasterZlib.c.
References XmlBlasterZlibReadBuffers::c_stream, XmlBlasterZlibReadBuffers::compBuffer, XmlBlasterZlibReadBuffers::currCompBufferP, XmlBlasterZlibReadBuffers::currCompBytes, and XmlBlasterZlibReadBuffers::debug.
Referenced by initConnection().
int xmlBlaster_initZlibWriter | ( | XmlBlasterZlibWriteBuffers * | zlibWriteBufP | ) |
Call only once for a socket connection stream.
Definition at line 68 of file xmlBlasterZlib.c.
References XmlBlasterZlibWriteBuffers::c_stream, and XmlBlasterZlibWriteBuffers::debug.
Referenced by initConnection().
ssize_t xmlBlaster_readnCompressed | ( | XmlBlasterZlibReadBuffers * | zlibReadBufP, | |
int | fd, | |||
char * | ptr, | |||
size_t | nbytes, | |||
XmlBlasterNumReadFunc | fpNumRead, | |||
void * | userP2 | |||
) |
Read compressed data from the socket and uncompress it.
zlibReadBufP | Struct holding necessary variables to use zlib | |
fd | The socket descriptor | |
ptr | The empty buffer which gets filled with raw bytes from socket (out parameter) | |
nbytes | The max. size of 'ptr' |
Definition at line 193 of file xmlBlasterZlib.c.
References XmlBlasterZlibReadBuffers::c_stream, XmlBlasterZlibReadBuffers::compBuffer, XmlBlasterZlibReadBuffers::currCompBufferP, XmlBlasterZlibReadBuffers::currCompBytes, XmlBlasterZlibReadBuffers::debug, dumpZlib(), and XMLBLASTER_ZLIB_READ_COMPBUFFER_LEN.
Referenced by readnCompressed().
Here is the call graph for this function:
ssize_t xmlBlaster_writenCompressed | ( | XmlBlasterZlibWriteBuffers * | zlibWriteBufP, | |
int | fd, | |||
char * | ptr, | |||
size_tnbytes | ||||
) |
Compress given bytes with zlib and write them to the socket.
fd | The socket descriptor | |
ptr | The buffer with raw bytes | |
nbytes | The number of bytes in 'ptr' |
Definition at line 92 of file xmlBlasterZlib.c.
References XmlBlasterZlibWriteBuffers::c_stream, XmlBlasterZlibWriteBuffers::compBuffer, XmlBlasterZlibWriteBuffers::debug, dumpZlib(), writen(), and XMLBLASTER_ZLIB_WRITE_COMPBUFFER_LEN.
Referenced by writenCompressed().
Here is the call graph for this function: