eidheim / Simple-WebSocket-Server

A very simple, fast, multithreaded, platform independent WebSocket (WS) and WebSocket Secure (WSS) server and client library implemented using C++11, Boost.Asio and OpenSSL. Created to be an easy way to make WebSocket endpoints in C++.
MIT License
800 stars 277 forks source link

When I use Google Chrome it happend a error. #77

Open Wangweilai1 opened 7 years ago

Wangweilai1 commented 7 years ago

Excuse me, When Wss protocol work, I have an problem is that in my program doesn't work for Google Chrome browser,the error when it connect; But it can worked well in IE11, when debug I found that in goole chrome when run on read_handshake(connection), and into asio::async_read_until(connection->socket, connection->read_buffer, "\r\n\r\n", [this, connection](const error_code &ec, size_t /bytes_transferred*/) function , the connection->read_buffer haven't data, and client of Google Chrome browser Websocket in dis connected, So I was confused for this problem.

Wangweilai1 commented 7 years ago

When i use openssl , I found a " No ALPN negotiated " marks, https://ma.ttias.be/day-google-chrome-disables-http2-nearly-everyone-may-31st-2016/ said, Chrome 51+ doesn't support "No ALPN negotiated " service, in my program, The Chrome is 59, I don't known it may be this problem so that can't connect with Chrome? and we should how to support ALPN negotiated?

Wangweilai1 commented 7 years ago

In Chrome 49 it is OK to connect, But Chrome 59 haven't connected, so it probably is ALPN in this program no't support, so How to support ALPN negotiated?

eidheim commented 7 years ago

I can't reproduce this in either MacOS or Linux. I'm guessing this is a Windows specific OpenSSL issue, and I'm of no help there sorry.