Skip to content

WiFiServer::write() write to all clients is not implemented #2743

Closed
@MeFisto94

Description

@MeFisto94

Basic Infos

So I tried searching if this issue is already present but due to the mass it could be that I overlooked it, so apologies if this is a duplicate report.

Description

The WiFiServer currently doesn't support writing to all clients. Instead one has to keep track of the client instances and do that manually which leads to a bit more ugly code.

See: WiFiServer.cpp#L135

I would file a pull request but since I am no C++ expert, the list code is hard to read.
In general I would recommend refactoring the code to be in line with the Arduino's EthernetServer.

The key difference is that it handles the client array internally, hiding it from the user.
This means that available always returns the first readable client instead of only returning new connections like WiFiServer does.

I agree that this is a design decision and that it would break exisiting code, so this is soley a proposal, but since I had to rewrite some code depending on the Platform (Arduino Mega vs ESP it would be awesome to have that consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for feedbackWaiting on additional info. If it's not received, the issue may be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions