lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Just started having my first look at Lua Socket, I am puzzled by the required files, I am probably missing something obvious but
local base = _G
local string = require("string")
local math = require("math")
local socket = require("socket.core")
I couldnt figure out what code the local socket = require("socket.core") was pulling in ?
I thought that socket.core was a folder hierarchy such as \socket\core.lua for example ? Anyway I trawled around the luasocket folder looking for core.lua or core.dll and couldnt spot anything at all
Also I wasnt sure what the point of the string and math lines were for ? They are pulled in as default libraries by Lua anyway ?
One final comment, I tried the daytimeclnt.lua example in the src folder, I can see why this was used as it is nice and succint and easy to understand. The only snag is that it is difficult to actually make work
I found a page listing a bunch of time Server URL's. I tried most of them and couldnt get any to work and give a valid response.
It would definitely put off a total newbie if that was the first example program he tried.
Regards Geoff