QNEthernet corrections, changes, and additions
ssilverman opened this issue · 2 comments
Great work collecting all this information. I have some corrections, changes, and additions for the QNEthernet library. First, I'll note that the library does implement every method defined by the Arduino Ethernet API reference, even if some are no-op's.
- All the begin functions that accept a MAC address are identical to the Arduino-defined ones. I've added additional ones that don't take a MAC address. This means that there's both a non-blocking
begin()and a blockingbegin(mac, [timeout])for starting with DHCP. (Line 44 in table and QNEthernet line) - Same table line, the parameter order for the static IP versions are not in the wrong order. You may have been looking at my extra begin functions that aren't defined in the Arduino API. (QNEthernet lines starting here)
- There is, in addition to
setDNSServerIP(), the Arduino API-definedsetDnsServerIP(). (Line 79 in table and QNEthernet line) - The get-host-by-name functionality is in the
DNSClientclass (Line 165 in table and QNEthernet line and QNEthernet README link) - It may not be relevant to the table (same line 165 as previous), but there's a "get time" SNTP example here: https://github.com/ssilverman/QNEthernet/blob/master/examples/SNTPClient/SNTPClient.ino
- I was wondering how QNEthernet's
connected()function is "alternative"? It does returntrueif the connection is not connected and there's data. (Line 182 in table) - I actually like the idea of having a client-specific local IP to indicate which network interface the connection is using. :) (Line 208 in table)
Thanks again for doing all this work!
1 2 3 updated to ✓
4 5 that table is about the Ethernet/WiFi object. other libraries too may have hostByName , time or ping elsewhere.
6 conn_->remaining.empty()? ✓
1 2 3 updated to ✓
4 5 that table is about the Ethernet/WiFi object. other libraries too may have hostByName , time or ping elsewhere.
6conn_->remaining.empty()? ✓
For 6, the QNEthernetClient.cpp logic is correct, it only returns false if not connected and empty. (I'm not sure if you're disagreeing or agreeing with my point 6. :) )
Thanks for changing the other relevant ones.