1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

streamline buffer handling

This commit is contained in:
andreas
2021-10-27 10:43:53 +02:00
parent e378f6e56b
commit b007586076
4 changed files with 94 additions and 147 deletions

View File

@@ -3,8 +3,6 @@
#include <lwip/sockets.h>
#include "GwBuffer.h"
#define WRITE_BUFFER_SIZE 1600
#define READ_BUFFER_SIZE 200
class Writer : public GwBufferWriter{
public:
wiFiClientPtr client;
@@ -63,9 +61,9 @@ class GwClient{
this->client=client;
this->logger=logger;
this->allowRead=allowRead;
buffer=new GwBuffer(logger,WRITE_BUFFER_SIZE);
buffer=new GwBuffer(logger,GwBuffer::TX_BUFFER_SIZE);
if (allowRead){
readBuffer=new GwBuffer(logger,READ_BUFFER_SIZE,false);
readBuffer=new GwBuffer(logger,GwBuffer::RX_BUFFER_SIZE);
}
overflows=0;
if (client != NULL){