Skip to content
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

Linux port using IBM's libraries #454

Closed
wants to merge 22 commits into from
Closed

Linux port using IBM's libraries #454

wants to merge 22 commits into from

Conversation

caiofbpa
Copy link

@caiofbpa caiofbpa commented Jan 18, 2018

Related to #346

This should work on macOS, iOS and Linux. I couldn't manage to run Autobahn|Testsuite on it, though. Can someone help? Also I'm not sure how to test on other platforms like tvOS and watchOS.

I'm not sure replacing SSCommonCrypto (like I did) is the best approach. Would you rather have a #if os(Linux) around the Cryptor usage, keeping the old code on the #else? Or maybe go for something a little more fancy like what was done in WSStream to allow polymorphism? This polymorphic route is a bit bumpy because it could mean dynamic dependencies on Package.json and Cartfile or coming up with a plugin mechanism involving multiple repos.

I personally like the idea of just using IBM's cross-platform libraries "everywhere" as the base while the Server Work Group (or Apple itself) doesn't come up with an official solution. For that we would have to make sure IBM's BlueCryptor (and later on BlueSocket) work on all targeted platforms.

I tried to add BlueCryptor to Cartfile, but apparently BlueCryptor does not support Carthage. Is that an impediment to using it in Starscream?

@wbarksdale
Copy link

This isn't really getting to linux support because SecTrust and SSLSettings are still used in the WSStream protocol, i'm unsure how to get around those...

@caiofbpa
Copy link
Author

@daltoniam I'm hitting a lot of roadblocks in this port. Can you help me? I'm stuck on an error about converting DispatchQueue to dispatch_queue_t.

@caiofbpa caiofbpa changed the title Use Cryptor to encode security key Linux port Jan 25, 2018
@caiofbpa caiofbpa changed the title Linux port Linux port using IBM's libraries Jan 25, 2018
@caiofbpa
Copy link
Author

I decided to take the IBM's route and implement WSStream with BlueSocket. The connection is established successfully, but I need more help testing it, I'm sure it's not working correctly, but I have no idea why. @wbarksdale can you help me? @daltoniam what do you think?

@wbarksdale
Copy link

this is looking promising! I'll take it for a spin tomorrow

@caiofbpa
Copy link
Author

caiofbpa commented Feb 5, 2018

Although I managed to get it to compile on Linux and the connection seems successful, it's unable to send or receive messages.

I solved my problem using the WebSocketClient on https://github.com/vapor/engine instead, and I don't intend on moving forward with this port, so I'm closing this PR.

If @wbarksdale or anyone else wants to continue this work, the code will be available at https://github.com/caiofbpa/starscream/tree/support-cryptor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants