1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

host emulation: improve udp, persistent spiffs (#5605)

This commit is contained in:
david gauchard
2019-01-15 22:56:54 +01:00
committed by GitHub
parent 8a64a1236f
commit 6bd26a3b4a
16 changed files with 266 additions and 142 deletions

View File

@ -79,20 +79,12 @@ public:
_sock = -1;
}
#if 0
void setMulticastInterface(const ip_addr_t& addr)
{
(void)addr;
// user multicast, and this is how it works with posix: send to multicast address:
_dst.addr = staticMCastAddr;
}
#endif
void setMulticastInterface(const ip_addr_t* addr)
{
(void)addr;
// user multicast, and this is how it works with posix: send to multicast address:
_dst.addr = staticMCastAddr;
}
void setMulticastTTL(int ttl)
{
@ -118,12 +110,12 @@ public:
void seek(const size_t pos)
{
fprintf(stderr, MOCK "TODO: implement UDP offset\n");
if (!isValidOffset(pos))
{
fprintf(stderr, MOCK "UDPContext::seek too far (%zd >= %zd)\n", pos, _inbufsize);
exit(EXIT_FAILURE);
}
mockUDPSwallow(pos, _inbuf, _inbufsize);
}
bool isValidOffset(const size_t pos) const {