love2d-lua-websocket
love2d-lua-websocket copied to clipboard
About TLS/SSL
This library aims to be simple and easy to use. Using SSL libraries will make it difficult to configure and build for lua developers, so WSS connection will not be implemented.
löve-ws with OpenSSL
Just pointing this out for people in the future.
Right now to make work of luasec in love it's a bit complex, but I'm going to write the details here:
You can use old prebuild libraries from here (https://github.com/26F-Studio/love-luasec)
- Compile luasec or use the prebuilt library
- Add the require for luasec
local ssl = require "ssl"it's fine after line 16 - On line 73 (it should be 74 now) just add this lines:
m.socket = ssl.wrap(m.socket)andm:dohandshake()
If I'm not mistaken, the rest of the library should work without extra changes, but I'll need to test it out in more detail.
Love your pure lua implementation, it's way simpler. And yes, TSL/SSL is pure pain, indeed.
@holywyvern Thank you for your testing and for sharing the steps to make the lib work with luasec. Your instructions are clear and will undoubtedly help other developers who need TLS/SSL support in the future.