-
Notifications
You must be signed in to change notification settings - Fork 242
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
TLS/HTTPS (semi) support #265
Conversation
Added compatibility table and ssl description
HTTPS currently not yet supported | ||
* OpenSSL Support - [issue39](https://github.com/getnamo/socketio-client-ue4/issues/39), temporary [workaround available](https://github.com/getnamo/socketio-client-ue4/issues/72#issuecomment-371956821). | ||
HTTPS is only supported through a little change in the source code. | ||
* OpenSSL Support - <a href="https://github.com/dobby5/socketio-client-ue4/blob/0d3420f626704802d457e125bf01d0d4d26bbfe3/Source/SocketIOLib/SocketIOLib.Build.cs#L63-L73">Remove this declaration and compile the code, that's all.</a> |
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.
If there is a merge please change this line with your branch @getnamo
I'm not a fan of overriding SSL support by dropping non-ssl as that mode is far more common in use case. What can be done is to merge this into a ssl branch until we figure out a way to swap support via url lookup (https -> ssl, http-> standard) |
added merge to secondary branch here: https://github.com/getnamo/socketio-client-ue4/tree/ssl |
open future pull requests there until we manage to support both methods and it becomes ready for master |
I thing it is possible to including a variable at the said places, but I see the problem mainly at the place https://github.com/getnamo/socketio-client-ue4/blob/d0cad0135c1aca1ea4d891697c21f96767741fc0/Source/SocketIOLib/Private/internal/sio_client_impl.h#L38-L62, in the inclusion of the SSL or non-SSL hpp data. |
Let's see that's used in https://github.com/getnamo/socketio-client-ue4/blob/d0cad0135c1aca1ea4d891697c21f96767741fc0/Source/SocketIOLib/Private/internal/sio_client_impl.h#L81 which is used in https://github.com/getnamo/socketio-client-ue4/blob/d0cad0135c1aca1ea4d891697c21f96767741fc0/Source/SocketIOLib/Private/internal/sio_client_impl.cpp#L283 and https://github.com/getnamo/socketio-client-ue4/blob/d0cad0135c1aca1ea4d891697c21f96767741fc0/Source/SocketIOLib/Private/internal/sio_client_impl.cpp#L470 and https://github.com/getnamo/socketio-client-ue4/blob/d0cad0135c1aca1ea4d891697c21f96767741fc0/Source/SocketIOLib/Private/internal/sio_client_impl.cpp#L514. We might be able to keep two type of configs and pass them in depending on connection types I think. The above is only a typedef so I do think we can keep two types |
Yeah we'd need a different handler for on_message in tls variant https://github.com/getnamo/socketio-client-ue4/blob/d0cad0135c1aca1ea4d891697c21f96767741fc0/Source/SocketIOLib/Private/internal/sio_client_impl.cpp#L76 with the tls config, this can be changed on construction. High level: On connect -> if mode is mismatching url, we'd re-create the lib client with correct mode and then connect. Each component has it's own client so we should be able to interweave tls and non tls connections |
Good morning, if I understand it correctly, your goal is basically to make these changes, right? |
I have taken the changes from joelnordell and adapted them to the new version of our socket.io-client-cpp. I still get an error with the "class/struct" maybe you have an idea how we can fix this. I have pushed the changes into a new branch: |
Going to work on it within #267 At a first glance, I'm not fully convinced at the templated approach joelnordell did, seems unnecessarily complicated, but if it works, it could be a quick enough patch. Will know more later today. |
Got it to compile and pulled into https://github.com/getnamo/socketio-client-ue4/commits/ssl-dev Emit still works, but receiving events broke, TBC. Update: After seeing the current changes breaking on-receive without matching binding functions, I'm back to not being convinced a templated variant is the right approach. Will push this back one week and re-factor so it's easier to reason. |
Hello @getnamo, I hope that we can find a quick fix for this. I will have a look at your changes during the day. Maybe you will find another approach to solution. I am also curious how you will solve it. |
@getnamo Do you have any news? Good and fast work by the way with the UE5 update. |
Still pushing the SSL refactor for next week (it's a lot more involved than the ue5 upgrade) as I'm out of time for sio this week. Will know more then. |
Okay good |
See: #39 (comment)