mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
fix host emulation (#5382)
This commit is contained in:
@ -44,7 +44,7 @@ extern "C" const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY);
|
||||
|
||||
// lwIP API side of WiFiServer
|
||||
|
||||
WiFiServer::WiFiServer (IPAddress addr, uint16_t port)
|
||||
WiFiServer::WiFiServer (const IPAddress& addr, uint16_t port)
|
||||
{
|
||||
(void)addr;
|
||||
if (port < 1024)
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
int connect(ip_addr_t* addr, uint16_t port)
|
||||
int connect(const ip_addr_t* addr, uint16_t port)
|
||||
{
|
||||
return mockConnect(addr->addr, _sock, port);
|
||||
}
|
||||
|
@ -55,16 +55,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool connect (ip_addr_t addr, uint16_t port)
|
||||
bool connect (const ip_addr_t* addr, uint16_t port)
|
||||
{
|
||||
_dst = addr;
|
||||
_dst = *addr;
|
||||
_dstport = port;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool listen(ip_addr_t addr, uint16_t port)
|
||||
bool listen(const ip_addr_t* addr, uint16_t port)
|
||||
{
|
||||
bool ret = mockUDPListen(_sock, addr.addr, port, staticMCastAddr);
|
||||
bool ret = mockUDPListen(_sock, addr->addr, port, staticMCastAddr);
|
||||
register_udp(_sock, this);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user