mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 19:05:44 +00:00
Copilot suggestion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
85a4a1b67d
commit
af3ddddcf4
@ -37,7 +37,11 @@ bool AsyncUDP::writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t p
|
|||||||
// AsyncUDPPacket
|
// AsyncUDPPacket
|
||||||
AsyncUDPPacket::AsyncUDPPacket(EthernetUDP &source) : _udp(source), _remoteIP(source.remoteIP()), _remotePort(source.remotePort())
|
AsyncUDPPacket::AsyncUDPPacket(EthernetUDP &source) : _udp(source), _remoteIP(source.remoteIP()), _remotePort(source.remotePort())
|
||||||
{
|
{
|
||||||
|
if (_udp.available() > 0) {
|
||||||
_readLength = _udp.read(_buffer, sizeof(_buffer));
|
_readLength = _udp.read(_buffer, sizeof(_buffer));
|
||||||
|
} else {
|
||||||
|
_readLength = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IPAddress AsyncUDPPacket::remoteIP()
|
IPAddress AsyncUDPPacket::remoteIP()
|
||||||
|
Loading…
Reference in New Issue
Block a user