nabto_device_limit_stream_segments()

DESCRIPTION

Limit memory usage for streaming

This function limits the amount of segments which can be allocated for streaming. A segment is 256 bytes of data, so the max allocated memory for streaming is limit*256bytes.

If the limit is reached no new segments can be allocated until there again are free segments available. The streams are built to survive a case where no more segments can be allocated. But the performance will be affacted.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_limit_stream_segments(NabtoDevice* device, size_t limit)

PARAMETERS

device:
[in] The device.
limit:
[in] The maximum number of stream segments used by the device.

RETURNS

NABTO_DEVICE_EC_OK iff ok.