BluetoothMessageChunker

Helper class for working with the message chunks that traverse the bluetooth connection. Necessary since bluetooth packets have an MTU that requires that our RemoteMessages are broken up into smaller chunks.

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
public int mtu

Functions

Link copied to clipboard
public String addMessageChunk(Array<byte> chunk)
Stores the individual message chunks until a full message can be reconstructed
Link copied to clipboard
Chunk a RemoteMessage payload into smaller messages that will fit inside the provided mtu
Chunk a RemoteMessage string into smaller messages that will fit inside the provided mtu Convenience wrapper around the chunk method, that takes a RemoteMessage string instead of a byte array
Link copied to clipboard
public int getMtu()
Link copied to clipboard
public void setMtu(int mtu)