Lua Module Lua Socket

lua-users home

LuaSocket binary module


This is version 1.4 of the [LuaSocket] library, compiled as a module for use with a Lua40 interpreter with loadmodule support. See LuaBinaryModules to download a Lua interpreter with loadmodule.

VersionNotice: This page pertains to an earlier version of Lua (4.0 and 5.0beta) using a loadmodule extension. Lua 5.1 uses package.loadlib and require. Lua 5.0 uses loadlib.)

Quick hint: you can run the LuaSocket examples like so:

    lua -e 'assert(loadmodule("socket"))' -f check_links.lua



Here's a patch against luasocket-1.4, to add the loadmodule hooks.


Commandline to compile under linux:

gcc -DDLL_EXPORT='' -shared -o luasocket.c -O2 -I../lua-4.0.1-loadmodule/include -L../lua-4.0.1-loadmodule/lib -llua-4.0 -llualib-4.0


[GNU/Linux-i386 .so] | [Win32 DLL]

users of other platforms: please contribute ports!

RecentChanges · preferences
edit · history
Last edited April 17, 2007 11:44 am GMT (diff)