Closed Phantomouse closed 3 years ago
Hello,
It being an alpha means I haven't looked at Windows whatsoever so it can just be a mistake on my end that will be fixed in later releases. I really only focus on macOS and Linux when developing.
That's a pity. I like your library, but sometimes I need to use it under Windows. I've made a little changes to fix it in my local environment, but it will be great if you'' return to my issue when you'll have more time.
auto res = asyncSocket->write(selectedData.data(), (int) selectedData.length());
if (!res.second) { // <=== LINE 178
if (this->resetIdleTimeoutOnSend) {
auto *webSocketData = (WebSocketData *) us_socket_ext(SSL, (us_socket_t *) asyncSocket);
webSocketData->hasTimedOut = false;
asyncSocket->timeout(this->idleTimeoutComponents.first);
}
}
It works on Windows - just maybe not right now in alpha stage
I can reproduce this with Visual Studio 16.9.3.
However, this is a bug in Microsoft's crappy compiler. It works in C++17 mode (but then you can't use designated initializers).
https://en.cppreference.com/w/cpp/language/structured_binding
This is structured binding, they broke it in their latest preview. This is not a bug here, it is Microsoft's failure to create anything close to a competent compiler. Visual Studio has always been the Internet Explorer of development tools - it sucks. I don't care.
Use clang instead, they support it. Then you get a compiler that doesn't eat ass.
Hi there!
I'm using Visual Studio Community 2019 on Windows 10, /std:c++latest. uWebSockets version 19.0.0a5. uSockets version 0.7.1.
Having the following code (worked fine with uWebSockets v.18.14.0):
After updating uWebSockets to 19.0.0a5 I've encountering error C3493 "failed" cannot be implicitly captured because no default capture mode has been specified" in 178 line of WebSocketContextData.h.
Switching compiler to /std:c++17 standard is fixing the problem, but causing another error in line 5 of my code (
.idleTimeout = 0,
and so on): error C7555: use of designated initializers requires at least '/std:c++latest'What am I doing wrong? Is it misconfiguration of my compiler or I just can't use std:c++latest with uWebSockets?