dmccuskey / dmc-websockets

Corona SDK client library for the WebSocket protocol (RFC6455)
MIT License
11 stars 7 forks source link

WSS errors !! #6

Open florindumitru opened 7 years ago

florindumitru commented 7 years ago

You can try this server: wss://sandbox.kaazing.net/echo I also try locally and on heroku(wss://wssdf.herokuapp.com)...I get the same error !

ERROR in async_tcp coroutine Dec 21 10:09:50.399 ERROR: Runtime error dmc_corona/dmc_sockets/async_tcp.lua:523: dmc_corona/dmc_sockets/async_tcp.lua:240: attempt to call method 'setoption' (a nil value) stack traceback: [C]: in function 'error' dmc_corona/dmc_sockets/async_tcp.lua:523: in function '_processCoroutineQueue' dmc_corona/dmc_sockets/async_tcp.lua:546: in function <dmc_corona/dmc_sockets/async_tcp.lua:544> ?: in function <?:169>

chkuendig commented 6 years ago

This is due to https://github.com/dmccuskey/dmc-sockets/commit/0d939f40692f6458e3862c572d291400a2653c87 and how luasec works. Just reverse this commit.

Also, if you want this to work on heroku, you need SNI. I fixed both in my branch https://github.com/chkuendig/dmc-websockets