Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Running Http and Websocket Servers concurrently #1

Closed
khoih-prog opened this issue Aug 5, 2020 · 1 comment
Closed

Running Http and Websocket Servers concurrently #1

khoih-prog opened this issue Aug 5, 2020 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@khoih-prog
Copy link
Owner

@jakespeed1311

This is an issue from WebSockets_Generic Library relating to this WebSockets2_Generic Library

Support as Http server and the webscok server on Arduino DUE

Moving it now to the correct place

Probably it works because your clients are constantly querying the websocket and can do that ?

If you specify your problem early, it'll be helpful and save time

OK, if I understand correctly now, your problem is that

  1. the WebSocketServer is in blocking mode
  2. you don't have any WebSockets Client
  3. WS Server is blocked, waiting for Client before moving forward
  4. The HTTP WebServer can't continue.

If so, I think I can fix the problem by modifying the WebSockets2_Generic Library.

Please wait until I find out the fix and post the new release.

I'm moving the issue to the correct place of WebSockets2_Generic Library.

khoih-prog added a commit that referenced this issue Aug 6, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
khoih-prog added a commit that referenced this issue Aug 6, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
khoih-prog added a commit that referenced this issue Aug 6, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
khoih-prog added a commit that referenced this issue Aug 6, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
khoih-prog added a commit that referenced this issue Aug 6, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
khoih-prog added a commit that referenced this issue Aug 6, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
@khoih-prog
Copy link
Owner Author

Hi @jakespeed1311

The new Version v1.0.6 has been released with these new features to fix the blocking action of WebSockets Server that prevents the concurrent running of WebServer and WebSockets Server you experienced so far.

New in v1.0.6

  1. Add non-blocking WebSockets Server feature to enable WS Server and WebServer running concurently. See Support as Http server and the Websockets server on Arduino DUE and Running Http and Websocket Servers concurrently. Thanks to bug report and persistence of Jake.
  2. Add non-blocking WebSockets Server and WebServer examples.
  3. Add Ethernet Library Patches
  4. Add Arduino SAMD Packages_Patches to fix compiler errors when using Standard Template Library STL

Please try the example SAMDUE-Ethernet_AdvancedWebServer to have feelings. Then modify it to fix your purpose.

Please be noted that your bug report and persistence, resulting in the new Version v1.0.6, has been noted in Contributions-and-Thanks

@khoih-prog khoih-prog added enhancement New feature or request bug Something isn't working labels Aug 6, 2020
khoih-prog added a commit that referenced this issue Sep 9, 2020
### New in v1.0.6

1. Add ***non-blocking WebSockets Server*** feature to enable WS Server and WebServer running ***concurrently***. See [***Support as Http server and the Websockets server on Arduino DUE***](khoih-prog/WebSockets_Generic#1) and [***Running Http and Websocket Servers concurrently***](#1). Thanks to bug report and persistence of [Jake](https://github.com/jakespeed1311).
2. Add non-blocking WebSockets Server and WebServer examples. 
3. Add Ethernet Library Patches
4. Add Arduino SAMD Packages_Patches to fix compiler errors when using [Standard Template Library STL](https://en.wikipedia.org/wiki/Standard_Template_Library)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant