You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys,
I've been trying to connect to a websocket as a client for a day now. I know this sounds desperate but cold you please help me figure out what's wrong and explain what am I doing at all.
So, my goal is to connect to a certain websocket and send custom HTTP headers. Based on the minimal examples I arrived to the following code
First of all, how do I make sure it connects to wss://myaddress.com and not https://myaddress.com. Because Chrome shows that it connects to wss.
Since I couldn't find documentation except the example applications, I do not understand some parts oof this code:
What is "h2" and what is "alpn"?
When I run this application depending on the position of stars and other random events I get the callback_http with various reasons. However, it always ends with LWS_CALLBACK_CLOSED_CLIENT_HTTP
A typical order would be
Depending on how long I stay in the debugger (or maybe something else) I might receive LWS_CALLBACK_CLIENT_HTTP_WRITEABLE. No matter what I write there (or skip) the next step is p.18.
I am most certainly doing something wrong but I cannot figure out what exactly.
I stripped the original code keeping only the relevant parts (the rest is logging, logging, logging...) so it might not compile but you'll still get the point.
The text was updated successfully, but these errors were encountered:
Thank you, @lws-team for a quick response. Could you explain what does lws_h2_parse_end_of_frame: WINDOW_UPDATE 0x10000 + 0x7fff0000 = 0x80000000, too high
mean?
It means lws understands the server you're talking to overflowed the max window size possible. Some servers don't keep track well. There's a context creation info.option flag LWS_SERVER_OPTION_H2_JUST_FIX_WINDOW_UPDATE_OVERFLOW you can use to silently fix it up instead.
h2 means http/2.
alpn is an early indication of what protocol you want to talk on tls.
Hey guys,
I've been trying to connect to a websocket as a client for a day now. I know this sounds desperate but cold you please help me figure out what's wrong and explain what am I doing at all.
So, my goal is to connect to a certain websocket and send custom HTTP headers. Based on the minimal examples I arrived to the following code
First of all, how do I make sure it connects to
wss://myaddress.com
and nothttps://myaddress.com
. Because Chrome shows that it connects towss
.Since I couldn't find documentation except the example applications, I do not understand some parts oof this code:
callback_http
with variousreason
s. However, it always ends with LWS_CALLBACK_CLOSED_CLIENT_HTTPA typical order would be
Depending on how long I stay in the debugger (or maybe something else) I might receive
LWS_CALLBACK_CLIENT_HTTP_WRITEABLE
. No matter what I write there (or skip) the next step is p.18.I am most certainly doing something wrong but I cannot figure out what exactly.
I stripped the original code keeping only the relevant parts (the rest is logging, logging, logging...) so it might not compile but you'll still get the point.
The text was updated successfully, but these errors were encountered: