1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Harald Barth
c8c3697fa0 write buffer 2024-08-09 15:02:11 +02:00
Harald Barth
8c3c5dfe33 do not flush 2024-08-09 14:34:30 +02:00
2 changed files with 5 additions and 3 deletions

View File

@ -239,16 +239,18 @@ void EthernetInterface::loop2() {
DIAG(F("Ethernet outboundRing socket=%d error"), socketOut); DIAG(F("Ethernet outboundRing socket=%d error"), socketOut);
} else if (socketOut >= 0) { } else if (socketOut >= 0) {
int count=outboundRing->count(); int count=outboundRing->count();
if (Diag::ETHERNET) DIAG(F("Ethernet reply socket=%d, count=:%d"), socketOut,count);
{ {
char tmpbuf[count+1]; // one extra for '\0' char tmpbuf[count+1]; // one extra for '\0'
for(int i=0;i<count;i++) { for(int i=0;i<count;i++) {
tmpbuf[i] = outboundRing->read(); tmpbuf[i] = outboundRing->read();
} }
tmpbuf[count]=0; tmpbuf[count]=0;
if (Diag::ETHERNET)
DIAG(F("Ethernet reply socket=%d, count=%d, buf:%e"), socketOut,count,tmpbuf);
clients[socketOut].write(tmpbuf,count); clients[socketOut].write(tmpbuf,count);
} }
clients[socketOut].flush(); //maybe // do trust write does its thing and not flush
// clients[socketOut].flush(); //maybe
} }
looptimer(8000, F("Ethloop after outbound")); looptimer(8000, F("Ethloop after outbound"));

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-fozzie-202408090945Z" #define GITHUB_SHA "devel-fozzie-202408091233Z"