-
Notifications
You must be signed in to change notification settings - Fork 280
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
How to set SNI & connect to wss:// ? #71
Comments
Hi, same here. SNI doesn't seem to work. I managed to set the server address manually like this, but without effect. No matter if I set it before the connection is started, or later. It prints
The error on connecting is always the same: I don't even get to Any idea? Thank you, Alex |
After more research I found out that the following piece of Code now says that SNI is successful, but it is still not working:
Btw... same code is working on Boost::Beast and connection can be established and data received from the same source:
Both native_handle() function documentations say that a pointer of type SSL* is returned:
|
Hi @chronoxor,
Really liking the design of
CppServer
!....however, unfortunately, I am running into issues attempting to connect to a wss:// endpoint.In general, I am unable to get a simple example of connecting working so any help explaining how to correctly resolve and connect to a websocket endpoint specified by a wss:// uri would be greatly appreciated!
For example to connect to
wss://ws.okx.com:8443/ws/v5/public
(taken from here) I attempted the following based on the wss client example:and the upgrade request attempt:
This did not work, and my comments are:
(1) Do I need to set SNI somewhere on the stream native handle (using
SSL_set_tlsext_host_name
)(2) Why (once SNI is set) the upgrade request is not working? If you have any experience with this.
NOTE: something like this seemed to get round initial SSL v3 handshake errors
The text was updated successfully, but these errors were encountered: