Skip to content

Share port with WebServer #360

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

Open
me21 opened this issue Aug 20, 2018 · 3 comments
Open

Share port with WebServer #360

me21 opened this issue Aug 20, 2018 · 3 comments

Comments

@me21
Copy link

me21 commented Aug 20, 2018

Maybe it's feasible to add the ability to share the port with web server.
ESPAsyncWebServer can do this. If this library supports it too, it would ease the migration between the libraries (no websocket url change would be necessary).

@zekageri
Copy link

zekageri commented Dec 2, 2020

I would love this feature. Currently this websocket lib is more stable than the async socket but i can't force it to work on the same port.
I tried it like this:

WebSocketsServer syncSocket = WebSocketsServer(80,"MyESP");

And connect to it with JS but it is refusing the connection becaue the asyncwebserver is running on the same port

AsyncWebServer server(80);

If i call the WebSocketsServer with port other than 80 it is working properly. :(
The problem with this approach that if i want to port forward my ESP to the outter network i have to forward more than one port and this is frustrating.

I would love to see some workaround!

@d-a-v
Copy link
Contributor

d-a-v commented Dec 2, 2020

FWIW, #575 could be of some use for ESP32 too (how to use it).

@me21 @zekageri You may ask help on esp32 arduino core issue tracker.

@zekageri
Copy link

zekageri commented Dec 2, 2020

Thank you for your suggestion. I will investigate this addHook but i'm using asyncwebserver and i can see the addHook is only implemented on esp8266 regular server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants