Home » U++ Library support » U++ MT-multithreading and servers » Websocket issue
| Re: Websocket issue [message #61959 is a reply to message #61958] |
Thu, 26 March 2026 17:18   |
Oblivion
Messages: 1266 Registered: August 2007
|
Senior Contributor |
|
|
Ok, I fixed it, it works -here- with your example too. SSL connection was missing SNI.
However before the official patch, you can simply replace the connect method:
bool WebSocket::Connect(const String& uri_, const String& host_, bool ssl_, int port)
{
Clear();
client = true;
redirect = 0;
uri = uri_;
host = host_;
ssl = ssl_;
if(ssl && !IsNull(host))
socket->SSLServerNameIndication(host);
if(socket->IsBlocking()) {
if(!addrinfo.Execute(host, port)) {
Error("Not found");
return false;
}
LLOG("DNS resolved");
StartConnect();
while(opcode != READING_FRAME_HEADER) {
Do0();
if(IsError())
return false;
}
}
else {
opcode = DNS;
addrinfo.Start(host, port);
}
return true;
}
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
Goto Forum:
Current Time: Wed Apr 29 19:52:55 GMT+2 2026
Total time taken to generate the page: 0.00627 seconds
|