Skip to content

UDP send data loss #1988

Closed
Closed
@dogmaphobic

Description

@dogmaphobic

This is related to #1696.

Is there a way to expose this to WiFiUdp.h?

https://github.com/esp8266/Arduino/blob/master/libraries/Ethernet/src/utility/socket.cpp#L409

That is, a way to check the status of the buffer before attempting to write?

From WiFiUdp, we don't have access to the underlying socket. If the socket was exposed, I could do something like:

WiFiUDP   udp;

<...>
udp setup and configured, etc.
<...>

uint16_t bufferFreeSize()
{
  uint16_t ret =0;
  SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
    ret = W5100.getTXFreeSize(udp.socket());
  }
  SPI.endTransaction();
  return ret;
}

Thanks!

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions