KAAFramer Class Reference

Inherits from NSObject
Declared in KAAFramer.h

Overview

KaaTcp Framer class. Used to cut incoming byte stream into MQTT frames, and deliver frames to MqttFrameDelegate. Framer Class typically used from MessageFactory class.

– pushBytes:

Process incoming bytes stream. Assumes that data is unprocessed. In case of previous call eaten not all data on next iterations data should start from unprocessed bytes.

- (int)pushBytes:(NSMutableData *)data

Parameters

data

Data to push

Return Value

Number of bytes processed from this data.

Discussion

Process incoming bytes stream. Assumes that data is unprocessed. In case of previous call eaten not all data on next iterations data should start from unprocessed bytes.

Exceptions

KaaTcpProtocolException

In case of protocol errors.

Declared In

KAAFramer.h

– flush

Reset Framer state by dropping current frame.

- (void)flush

Discussion

Reset Framer state by dropping current frame.

Declared In

KAAFramer.h