lua-users home
lua-l archive

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


I believe that in the new Luasocket Diego has added WSACleanup(),
however it is up to the user to call it. I use a gc method on
the socket namespace to make sure it gets called.



David B

Wim Couwenberg <wcou@oce.nl> wrote:

>> A clean way to do that
>> is to create a userdata (it will look like a Lua object) which exports
>> your functions (its methods) and define a metatable for it.  The __gc
>> field of the metatable could store a function that calls SDL_Quit.
>
>Also in this category:  LuaSocket does not automatically call WSACleanup
>(Win32) on exit. Failing to do so leads to serious problems on Win32.  So
>either it should be documented to call WSACleanup manually (maybe not so
>nice in dynamic loading scenario's?) or something like Tomas suggested
>should be implemented.  LuaSocket works great by the way, it just took us a
>while to identify this issue...
>
>--
>Wim