Nets v3.0.0
stream-message.h File Reference

Common network stream message functions. More...

#include "nets/defines.h"
#include <stdlib.h>
#include <string.h>

Data Structures

struct  StreamMessage
 Stream message structure. More...

Macros

#define STREAM_MESSAGE_MAX_LENGTH_SIZE   sizeof(uint64_t)
#define MAX_DATAGRAM_MESSAGE_SIZE   1200

Functions

int sHandleStreamMessage (const uint8_t *receiveBuffer, size_t byteCount, uint8_t *messageBuffer, size_t messageBufferSize, size_t *messageByteCount, uint8_t messageLengthSize, int(*receiveFunction)(StreamMessage, void *), void *functionHandle)

Detailed Description

Common network stream message functions.

Macro Definition Documentation

◆ STREAM_MESSAGE_MAX_LENGTH_SIZE

#define STREAM_MESSAGE_MAX_LENGTH_SIZE   sizeof(uint64_t)

Maximum size of the stream message length in bytes.

◆ MAX_DATAGRAM_MESSAGE_SIZE

#define MAX_DATAGRAM_MESSAGE_SIZE   1200

Safe maximum UDP datagram size in bytes. (Includes IP and VPN overhead)