arduino / ArduinoCore-mbed

330 stars 195 forks source link

Ethernet.setRetransmissionTimeout, Ethernet.setRetransmissionCount #555

Open salasidis opened 2 years ago

salasidis commented 2 years ago

Both of these functions are defined in the Ethernet.h header, but the actual code is nowhere to be found, and I get a linker error

` Ethernet.setRetransmissionTimeout(150);

Ethernet.setRetransmissionCount(1); `

Z:\User\RS\EnviroWatch/EthernetInterface.ino:126: undefined reference to arduino::EthernetClass::setRetransmissionTimeout(unsigned short) Z:\User\RS\EnviroWatch/EthernetInterface.ino:127: undefined reference to arduino::EthernetClass::setRetransmissionCount(unsigned char)

Is this an oversight or by design?

i-herrera commented 1 year ago

Ethernet library in the Portenta is based on lwip so not all tunables are available. It is possible however to limit the number of retries directly from the sketch. For example, if the browser is not connected (eg. the soket is closed) write method should return '0'.

salasidis commented 1 year ago

Would that not require access into the library itself?

My only interacting with the browser is via send commands, and then everything else happens in the async library.

-------- Original message -------- From: i-herrera @.> Date: 2022-09-26 10:31 (GMT-05:00) To: arduino/ArduinoCore-mbed @.> Cc: rsalasidis @.>, Author @.> Subject: Re: [arduino/ArduinoCore-mbed] Ethernet.setRetransmissionTimeout, Ethernet.setRetransmissionCount (Issue #555)

Ethernet library in the Portenta is based on lwip so not all tunables are available. It is possible however to limit the number of retries directly from the sketch. For example, if the browser is not connected (eg. the soket is closed) write method should return '0'.

— Reply to this email directly, view it on GitHubhttps://github.com/arduino/ArduinoCore-mbed/issues/555#issuecomment-1258131492, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK5VYZN5FR2XRCOXQX6J27TWAGXVTANCNFSM6AAAAAAQUKSWYU. You are receiving this because you authored the thread.Message ID: @.***>