BetaRavener/upy-websocket-server

Trouble getting working

Closed this issue · 2 comments

When I start websocket_demo, I then browse to the server, and get "Client connection from ..." However, the html file is never returned and browser hangs. I put a print statement in the "process" method, and it appears that process is in some infinite loop. Any suggestions? Thanks!

I've been away from PC for some time.. Well from description it's hard to analyze. Try to specify browser and use development tools in browser to check network packets that get sent and received. The process method is indeed in infinite loop in demo application because the server has to actively check if there's any communication on websockets. Unfortunately, we don't have threads on MCU, so we have to do it like this. However, process is only responsible for websocket stuff. If you don't even receive webpage, I'd look at _serve_page in websocket_server.py.

Closing due to inactivity, reopen if needed.