File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ class EthernetClient : public lwipClient {
1414 this ->bindCNetIf (Ethernet);
1515 }
1616
17+ int connect (const char * host, uint16_t port) {
18+ auto res = lwipClient::connect (host, port);
19+
20+ this ->bindCNetIf (Ethernet);
21+
22+ return res;
23+ }
24+
1725 int connect (IPAddress ip, uint16_t port) {
1826 auto res = lwipClient::connect (ip, port);
1927
Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ class WiFiClient: public lwipClient {
1414 this ->bindCNetIf (WiFiStation);
1515 }
1616
17+ int connect (const char * host, uint16_t port) {
18+ auto res = lwipClient::connect (host, port);
19+
20+ this ->bindCNetIf (WiFiStation);
21+
22+ return res;
23+ }
24+
1725 int connect (IPAddress ip, uint16_t port) {
1826 auto res = lwipClient::connect (ip, port);
1927
Original file line number Diff line number Diff line change @@ -459,6 +459,14 @@ bool CNetIf::dhcpRenew() {
459459
460460#endif
461461
462+ IPAddress CNetIf::dnsServerIP () {
463+ #if LWIP_DNS
464+ return CLwipIf::getInstance ().getDns (0 );
465+ #else
466+ return INADDR_NONE;
467+ #endif
468+ }
469+
462470/* ##########################################################################
463471 * ETHERNET NETWORK INTERFACE CLASS
464472 * ########################################################################## */
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ class CNetIf: public NetworkInterface {
167167 IPAddress localIP () { return IPAddress (this ->getIpAdd ()); }
168168 IPAddress subnetMask () { return IPAddress (this ->getNmAdd ()); }
169169 IPAddress gatewayIP () { return IPAddress (this ->getGwAdd ()); }
170- IPAddress dnsServerIP () { /* FIXME understand where dns should be managed */ }
170+ IPAddress dnsServerIP ();
171171
172172 void config (IPAddress _ip, IPAddress _gw, IPAddress _nm);
173173
You can’t perform that action at this time.
0 commit comments