Oolite 1.91.0.7644-241112-7f5034b
|
#include "OOTCPStreamDecoder.h"
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include "OODebugTCPConsoleProtocol.h"
Go to the source code of this file.
Classes | |
struct | OOTCPStreamDecoder |
Macros | |
#define | LogOOTCPStreamDecoderPacket(packet) |
Functions | |
static void | Error (OOTCPStreamDecoderRef decoder, OOALStringRef format,...) |
static void | PacketReady (OOTCPStreamDecoderRef decoder) |
OOTCPStreamDecoderRef | OOTCPStreamDecoderCreate (OOTCPStreamDecoderPacketCallback packetCB, OOTCPStreamDecoderErrorCallback errorCB, OOTCPStreamDecoderFinalizeCallback finalizeCB, void *cbInfo) |
void | OOTCPStreamDecoderDestroy (OOTCPStreamDecoderRef decoder) |
void | OOTCPStreamDecoderReceiveData (OOTCPStreamDecoderRef decoder, OOALDataRef data) |
void | OOTCPStreamDecoderReceiveBytes (OOTCPStreamDecoderRef decoder, const void *inBytes, size_t length) |
#define LogOOTCPStreamDecoderPacket | ( | packet | ) |
Definition at line 41 of file OOTCPStreamDecoder.c.
Referenced by PacketReady().
|
static |
Definition at line 227 of file OOTCPStreamDecoder.c.
References OOTCPStreamDecoder::cbInfo, OOTCPStreamDecoder::Error, OOALRelease(), and OOALStringCreateWithFormatAndArguments().
Referenced by OOTCPStreamDecoderReceiveBytes(), and PacketReady().
OOTCPStreamDecoderRef OOTCPStreamDecoderCreate | ( | OOTCPStreamDecoderPacketCallback | packetCB, |
OOTCPStreamDecoderErrorCallback | errorCB, | ||
OOTCPStreamDecoderFinalizeCallback | finalizeCB, | ||
void * | cbInfo ) |
Definition at line 64 of file OOTCPStreamDecoder.c.
References OOTCPStreamDecoder::cbInfo, OOTCPStreamDecoder::Error, OOTCPStreamDecoder::Finalize, OOTCPStreamDecoder::headerSpaceUsed, OOTCPStreamDecoder::nextPacketData, OOTCPStreamDecoder::nextSize, and OOTCPStreamDecoder::Packet.
void OOTCPStreamDecoderDestroy | ( | OOTCPStreamDecoderRef | decoder | ) |
Definition at line 85 of file OOTCPStreamDecoder.c.
References OOTCPStreamDecoder::cbInfo, OOTCPStreamDecoder::Finalize, OOTCPStreamDecoder::nextPacketData, and OOALRelease().
void OOTCPStreamDecoderReceiveBytes | ( | OOTCPStreamDecoderRef | decoder, |
const void * | inBytes, | ||
size_t | length ) |
Definition at line 112 of file OOTCPStreamDecoder.c.
References Error(), OOTCPStreamDecoder::header, OOTCPStreamDecoder::headerSpaceUsed, OOTCPStreamDecoder::nextPacketData, OOTCPStreamDecoder::nextSize, OOALCreateAutoreleasePool(), OOALDataCreateMutable(), OOALDestroyAutoreleasePool, OOALMutableDataAppendBytes(), OOALRelease(), OOALSTR, and PacketReady().
Referenced by OOTCPStreamDecoderReceiveData().
void OOTCPStreamDecoderReceiveData | ( | OOTCPStreamDecoderRef | decoder, |
OOALDataRef | data ) |
Definition at line 104 of file OOTCPStreamDecoder.c.
References OOALDataGetBytePtr(), OOALDataGetLength(), and OOTCPStreamDecoderReceiveBytes().
|
static |
Definition at line 184 of file OOTCPStreamDecoder.c.
References OOTCPStreamDecoder::cbInfo, Error(), kOOTCPPacketType, LogOOTCPStreamDecoderPacket, OOTCPStreamDecoder::nextPacketData, OOALDictionaryGetValue(), OOALIsDictionary(), OOALIsString(), OOALPropertyListFromData(), OOALRelease(), OOALSTR, OOTypeDescription(), and OOTCPStreamDecoder::Packet.
Referenced by OOTCPStreamDecoderReceiveBytes().