Yes, LUA has access to the Mach API. See the API documentations in the doc folder. And Luasockets is provided in the modules directory. Will it be easy? Probably not unless you are a seasoned programmer. You will have to learn a few things, be able to handle a fair amount of frustration, and be willing to read a lot of very dry programming manuals (the LUA manuals).
Steve