stm32duino / STM32Ethernet

Arduino library to support Ethernet for STM32 based board
151 stars 42 forks source link

EthernetClient.connect - return only 1 or 0 #82

Closed JAndrassy closed 7 months ago

JAndrassy commented 7 months ago

All examples have if (client.coonect(server, port), but getHostName doesn't return only 1 or 0, so connect can't return the return value of getHostName.

fpistm commented 7 months ago

Hi @JAndrassy Thanks for the PR, anyway it seems not correct as stated in the Arduino reference: https://www.arduino.cc/reference/en/libraries/ethernet/client.connect/

image

JAndrassy commented 7 months ago

that documentation is some hallucination. the Ethernet library never did that and no library by Arduino does that. and here WiFi libraries count too. and all examples show if (client.connected)

my PR to fix the doc is https://github.com/arduino-libraries/Ethernet/pull/240

fpistm commented 7 months ago

OK. Thanks for the feedback... let's see if other user will claim for issue with this udate.