arduino / arduino/ArduinoCore-mbed

WiFi and Ethernet library problems. Solutions:

Open
#766 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

The MbedClient is not copyable. There is an attempt to make it survive one copy right after creation, which should work for returning a copy from server.available() but that is not good enough.

Issues:
https://github.com/arduino/ArduinoCore-mbed/issues/753
https://github.com/arduino/ArduinoCore-mbed/issues/715

I have a simple fix for the copyability of Client. It just have to test it thoroughly yet. PR https://github.com/arduino/ArduinoCore-mbed/pull/768

---

The MbedServer doesn't manage connected clients as it should for proper implementation of available and print-to-all-clients. `available()` here works like Ethernet library's `accept()` and print-to-all-clients attempts to send a buffer with the listening socket which is not supported in Mbed/LwIP.

I can fix MbedServer too, but in which way? Implement `available()` and print-to-all-clients? It would break `available()` for users which already use it as it is? Just rename `available()` to `accept()` and add `available()` as a deprecated alias to `accept()`? And then even remove inheritance from Server/Print and the write methods, or just leave them with empty implementation?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the MbedClient and MbedServer entry points, especially available(), accept(), print-to-all-clients, and the Server/Print behavior. Review issues #753 and #715 plus PR #768, then determine the compatible API direction; done requires thoroughly tested client copying and resolved server-client behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.