Skip to content

Commit

Permalink
Add config for mqtt/http buf size
Browse files Browse the repository at this point in the history
  • Loading branch information
sepfy committed Oct 18, 2024
1 parent c3ea2f1 commit 120ccb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 8 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
#define CONFIG_SDP_BUFFER_SIZE 8096
#endif

#ifndef CONFIG_MQTT_BUFFER_SIZE
#define CONFIG_MQTT_BUFFER_SIZE 4096
#endif

#ifndef CONFIG_HTTP_BUFFER_SIZE
#define CONFIG_HTTP_BUFFER_SIZE 4096
#endif

#define AUDIO_LATENCY 20 // ms
#define KEEPALIVE_CONNCHECK 10000
#define CONFIG_IPV6 0
Expand Down
9 changes: 2 additions & 7 deletions src/peer_signaling.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@
#define KEEP_ALIVE_TIMEOUT_SECONDS 60
#define CONNACK_RECV_TIMEOUT_MS 1000

#ifndef BUF_SIZE
#define BUF_SIZE 2048
#endif

#define TOPIC_SIZE 128

#define HOST_LEN 64
#define CRED_LEN 128

Expand All @@ -47,8 +42,8 @@ typedef struct PeerSignaling {
TransportInterface_t transport;
NetworkContext_t net_ctx;

uint8_t mqtt_buf[BUF_SIZE];
uint8_t http_buf[BUF_SIZE];
uint8_t mqtt_buf[CONFIG_MQTT_BUFFER_SIZE];
uint8_t http_buf[CONFIG_HTTP_BUFFER_SIZE];

char subtopic[TOPIC_SIZE];
char pubtopic[TOPIC_SIZE];
Expand Down

0 comments on commit 120ccb5

Please sign in to comment.