Skip to content

Commit 397e6a1

Browse files
Merge pull request #124 from paclema/define_ws_tx_buffer_size
Added configurable WebSocket tx buffer size
2 parents 5c5fafb + 09c5309 commit 397e6a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/WebSocketClient.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
#include "HttpClient.h"
1010

11+
#ifndef WS_TX_BUFFER_SIZE
12+
#define WS_TX_BUFFER_SIZE 128
13+
#endif
14+
1115
static const int TYPE_CONTINUATION = 0x0;
1216
static const int TYPE_TEXT = 0x1;
1317
static const int TYPE_BINARY = 0x2;
@@ -86,7 +90,7 @@ class WebSocketClient : public HttpClient
8690
private:
8791
bool iTxStarted;
8892
uint8_t iTxMessageType;
89-
uint8_t iTxBuffer[128];
93+
uint8_t iTxBuffer[WS_TX_BUFFER_SIZE];
9094
uint64_t iTxSize;
9195

9296
uint8_t iRxOpCode;

0 commit comments

Comments
 (0)