Closed fkromer closed 3 years ago
Hi @fkromer
Thanks for using the issue template ;)
How often does this problem occur? And how many seconds passes between connecting
and error
?
Anyways, this means that your client didn't even make it to _handleRequest
which suggests that Arduino did'nt notice a client at all.
Hey @skaarj1989, you are welcome 😉 The error is displayed "immediatelly" (within a fraction of a second). Right, that's the strange thing...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@skaarj1989 The behavior is reproducible with Postman beta websocket support.
@fkromer Have you tried to add some delay before open()
? like 1-2 sec?
Last month I replaced my router which introduced some issues with the connection and that 1sec delay resolved it.
About your Ethernet shield, is it "official" or a clone?
I'm waiting more than 5 seconds after power on before I try to connect to my server with a client. ATM I'm not using a router/switch but connect directly via crossover cable. The behaviour when connecting via a router is not different. It's an official Ethernet shiled v2.
@skaarj1989 It seems like one cannot use port 80 with websockets and a restful api server at the same time 😄 Can I workaround this somehow? I'd like to avoid not using port 80 cause it's the default port for HTTP. (I'm using Ethernet + aWot for the RESTful API server implementation.)
Is it really a big deal for you to share a REST server with websocket one? If I were you, I would use two different ports like: 80 and 8080
@skaarj1989 I've forgotten about the limitations on these tiny embedded devices where there is of course no proxy which could port forward port 80 to port 8080 (or wathever other port the websocket server is running on) to make it seem like both, RESTful API and WebSockets are accessible via port 80.
In usual server scenarios it's possible for HTTP and WebSockets to share port 80 as soon as the handshake has been executed. However it seems like the handshaking on tiny devices is a bottleneck...
Describe the bug
If I try to connect from a client to a websocket server implemented with mWebSockets the connection is not always setup.
Environment info
Expected behavior
The connection setup is executed properly every time I try to connect.
Failure log
No failure log output in case of connection is not setup (
#define _DEBUG
,#define _DUMP_HANDSHAKE
,#define _DUMP_HEADER
and#define _DUMP_FRAME_DATA
are all set).Log in case connection is setup:
Additional context
Firecamp log output in case connection is not setup:
Firecamp log output in case connection is setup: