Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for WebServer using Ethernet #10690

Open
lbernstone opened this issue Dec 6, 2024 · 3 comments
Open

Example for WebServer using Ethernet #10690

lbernstone opened this issue Dec 6, 2024 · 3 comments
Labels
Type: Feature request Feature request for Arduino ESP32

Comments

@lbernstone
Copy link
Contributor

lbernstone commented Dec 6, 2024

Related area

Ethernet / Network

Hardware specification

all variants

Is your feature request related to a problem?

Please write an example demonstrating how to use the new Network library setDefault to provide a WebServer instance running on Ethernet that does other activity (maybe an HTTPClient) on the WiFi adapter.

Describe the solution you'd like

Please write an example demonstrating how to use the new Network library setDefault to provide a WebServer instance running on Ethernet that does other activity (maybe an HTTPClient) on the WiFi adapter.

Additional context

This is a new feature in v3.x that is completely undocumented. It would be helpful to have an example that shows how to use it.

@lbernstone lbernstone added the Type: Feature request Feature request for Arduino ESP32 label Dec 6, 2024
@JAndrassy
Copy link
Contributor

if you use the WebServer constructor with IP address it will listen only at that IP address
WebServer(IPAddress addr, int port = 80);

@lbernstone
Copy link
Contributor Author

WebServer has been redesigned around the Network library, but it would be nice to get an example of how to do this with something that is not so specific.

@me-no-dev
Copy link
Member

@lbernstone the solution that @JAndrassy proposes "should" work. Your setDefault should be STA if you want to use it with other things (and that is the default anyway). If you setDefault to ETH, then all outgoing traffic will go from there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature request Feature request for Arduino ESP32
Projects
None yet
Development

No branches or pull requests

3 participants