From 534b0cedf714d4de0a6cf67570e11f232cdccf84 Mon Sep 17 00:00:00 2001
From: Diego Nehab
-The core LuaSocket is almost entirely implemented in C. It is -usually available as a dynamic library which the interpreter can load -with the help of a loader module written in Lua. -Beginning with version 2.0 and following the Lua 5.0 trend, all LuaSocket -functionality is defined inside tables (or rather namespaces). No global -variables are ever created. -Namespaces are obtained with the require Lua function, which loads -and initializes any required library and returns the namespace. -For example, the core functionality or LuaSocket is usually available -from the "socket" namespace. -
- -
-socket = require("socket")
-print(socket.VERSION)
---> LuaSocket 2.0
-
-
LuaSocket offers much more than TCP and UDP support. As the library +evolved, support for HTTP, FTP, +SMTP, MIME, URLs and much more was made available. These are +mostly implemented in Lua itself, with critical parts implemented in C for +efficiency
+