-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add support for Beast WebSockets #81
Conversation
1bf6eb0
to
4fc5dc8
Compare
I have no clue how to fix the MinGW tests. I guess I'll need to split them up? |
Thanks a lot for this. Overall it looks really good. If I understand this correctly, this implements an overload for I would definitely like to merge this, but it might make more sense to wait with this before #80 has been completed. There will be conflicts for sure no matter what get merged first though. I have a few further comments, but please let me know if I've understood correctly that this PR makes use of beast websocket possible by implementing an overload or if I'm missing something. Thanks. |
Yes, that overload was missing for beast.
That's totally fine, I'll watch the PR. |
abb9191
to
a1c0bc3
Compare
I think you might want to add concurrency:
group: unittest-${{ github.ref }}
cancel-in-progress: true to the Update: I added it (I can remove it before a merge). |
@@ -51,6 +51,10 @@ if(MSVC) | |||
target_compile_options(unittest PRIVATE "-bigobj") | |||
endif() | |||
|
|||
if(MINGW) | |||
target_compile_options(unittest PRIVATE "-Wa,-mbig-obj") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably not enough for mingw, not sure what to do about it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the MinGW build fails in the pipeline. I'll have a look at it. Looks like it's not including boost as system headers which is also a bit unfortunate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like adding -O1
works (as in the examples) - I'll push later.
@@ -16,17 +16,18 @@ | |||
namespace wintls { | |||
namespace test { | |||
|
|||
// Note: This is prefixed to avoid conflicts with boost::beast::detail::is_invocable_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit unfortunate, even naming the namespace directly in line 44 (: decltype(wintls_is_invocable_test<R>(
) doesn't work.
f8807d2
to
4f17acb
Compare
I'm not sure what it does t be honest, but if it cancels builds that are outdated because of new commits then I guess it makes sense to keep it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great. Thanks for updating this to support the latest changes for standalone ASIO.
I'll have a look at the issues with MinGW if you cannot easily reproduce those (I have MinGW set up in my Windows VM locally).
It would be very cool if you could add an example for how to use this library with websockets. I guess you could more or less copy one of the smallest examples for boost.beast
and modify it for use with wintls?
4f17acb
to
530a193
Compare
This ensures that there can only be one active build on a given branch/tag/PR (from
I added two examples (from the sync and async examples from beast). I modified the CMakeLists.txt in the examples to make it easier to add examples. |
2d0d5ca
to
03461a9
Compare
It looks really good. Thanks a lot for your effort here. Two things: Please add the websocket example to Also, please split up your PR to separate commits. Something like the change to the Github actions workflows is not really related to the addition of websocket support. The same goes for the change to finding the root for OpenSSL when using MinGW (I have fixed the same in the master branch but your change looks cleaner). So at least three separate commits. Thanks a lot once again. |
I built it on Windows and it looked fine. Is there a difference when building on non-Windows systems?
I split it up in a few more commits, but I can squash them if desired. |
I've only tried to build it on non-Windows systems since it's so much simpler for me. I rarely use Windows for anything :-) It's very nice to know that the documentation can actually be built on Windows so thanks for that.
You might not have to split it into so many commits, but I definitely prefer too many commits than too few (for bisecting, cherry-picking etc.). Thanks a lot. Looks great. Thanks a lot for all your work on this. |
I ran into #22, and having to add the termination code isn't ideal, so I added the code here. Since I'm not sure if all Boost installations (that have at least ASIO) will have beast, I added a check if beast is available and didn't include it in the
beast/wintls.hpp
wrapper (is that assumption true?).I added tests for sync and async WebSocket servers to the echo test-case.