Defolder,
This may be the wrong place to post this, but my current test program using the DefoldWebSocket extension (And the 2 dependencies, LuaSec and LuaSocket).
My current program should attempt a connection to a test server hosted on a repl but the server receives nothing.
My main.script is as follows:
local client_async = require "websocket.client_async" function init(self) print("initialized network module") self.ws = client_async({ connect_timeout = 10, }) self.servertoken = "OXPqhF+MJO%Gn|vstuIRK8csRdg=59RTnW6%K=1o$wZrF!o3GAMzutJlcPlSoTcvNbH9AKnmU8MY^nk4fz&+3Vgt%?^ZfJfAAVI0_qTYjO_|mSlIKi##OahEFK_z+81K|vjuu!aoJBKwxRKr&|USxY_*-=Uukrk966dqFAJuWQs&u0QgnxZdUzPaSYOLmu$SAcBh#chfM3!IEJs9@0@_An-9BrTigtbRkGgCwxS-2EJ$yovp%TINbb$CNLKG2X%d" self.serveraddress = "ws://parry-host.grify.repl.co:25434" local sslparams = { mode = "client", protocol = "tlsv1_2", verify = "none", options = "all", } self.ws:on_connected(function(ok, err) if ok then print("Connected ws") else print("Unable to connect", err) end end) self.ws:on_disconnected(function() print("Disconnected") end) self.ws:on_message(function(message) print("Received message".. message) end) print("Touch!") print("Trying to reach Parry servers") self.ws:connect("ws://super-basic-ws-server.grify.repl.co", self.servertoken) end
Thank you,
Grify
P.S. I suppose I’ll have to change the server token now, won’t I XD