-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Description
When trying to connect to a secure websocket I get the following output:
Connection error: Unable to connect to server.dev on port 443, error: error in handshake : SSL - Internal error (eg, unexpected failure in lower-level module)
Here is my code:
ix::initNetSystem();
webSocket.setUrl("wss://server.dev/ws");
ix::SocketTLSOptions tlsOptions;
tlsOptions.caFile = "C:/path/to/cacert.pem";
webSocket.setTLSOptions(tlsOptions);
std::cout << "Connecting websocket..." << std::endl;
webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg)
{
if (msg->type == ix::WebSocketMessageType::Message)
{
std::cout << "Received message: " << msg->str << std::endl;
}
else if (msg->type == ix::WebSocketMessageType::Open)
{
std::cout << "Connected successfully" << std::endl;
}
else if (msg->type == ix::WebSocketMessageType::Error)
{
std::cout << "Connection error: " << msg->errorInfo.reason << std::endl;
}
}
);
webSocket.start();
Metadata
Metadata
Assignees
Labels
No labels