Hi I am sorry to resurrect this thread but I am missing something here, I was trying to run the example project:
local socket =require("socket")
client = socket.connect("google.com", 80)
client:send("GET /robots.txt HTTP/1.0\r\n\r\n")whiletruedo
s, status, partial = client:receive(1024)print(s or partial)if status =="closed"thenbreakendend
client:close()
I added Lua Socket plugin inside my project, then copied socket.lua from Gideros\All Plugins\luasocket\source into my project directory and then I get a
Thank you for your effort unfortunately that is the same socket.lua that is inside gideros folder/all plugins. Commenting that line was the first thing I did, but then it could not find socket module..
I tried loading an old app that was using Artur's unite framework (working at that time, and using luasocket) and it gets the same exact errors: I believe that we missed something through the updates, maybe it's just an outdated syntax which I am not able to identify
I think the issue is that luau doesn’t have a ‘require’ call, but Gideros propose a lua implementation of require that don’t have math as pre registered module
It seems to work without Lua Socket plugin at all, at least on android and windows
[edit: I would like add this bit of info inside a wiki page if only I had the rights to do it: where do you think should it be placed? Inside Lua API? Main Api? Plugins?]
please could you help with filling the wiki for this plugin because I haven't used it yet and I would have to create a test app to help document the wiki.
Or could you please post a sample code with most functions so I can try it and document it at the same time, thank you
Ok I will see what I can do, but before writing the wiki I prefer testing the code to make sure it works as intended. I am not into socket right now, I will see what I can do.
Comments
yes there is no doc in the wiki for this plugin, will try to make one
Likes: MoKaLux
Likes: MoKaLux
Likes: MoKaLux
I tried loading an old app that was using Artur's unite framework (working at that time, and using luasocket) and it gets the same exact errors: I believe that we missed something through the updates, maybe it's just an outdated syntax which I am not able to identify
Outputs:
Likes: MoKaLux, pie
Likes: pie, MoKaLux
[edit: I would like add this bit of info inside a wiki page if only I had the rights to do it: where do you think should it be placed? Inside Lua API? Main Api? Plugins?]
Likes: MoKaLux
I will create the page lua socket in the wiki asap. I think that should go in the plugins section.DONELikes: pie
Or could you please post a sample code with most functions so I can try it and document it at the same time, thank you
Viva Gideros
https://w3.impa.br/~diego/software/luasocket/socket.html
There is also this project which need to be updated, but it was a good example of the use of lua socket: https://github.com/ar2rsawseen/GiderosUnite
Likes: MoKaLux
Some servers require Certificate and SSL connection
(something like this http://mauriciocarneiro.github.io/software/luassl/references.html)
Likes: MoKaLux