lua-users home
lua-l archive

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


This code occurs in the body of the main loop in my server for an
online card game:

local new_conn = server_socket:accept()

If new_conn was closed after each iteration of the loop, I would have
a problem where clients cannot even remain connected to the server for
long enough to log in.

On Sat, May 16, 2020 at 12:14 PM Andrea <andrea.l.vitali@gmail.com> wrote:
>
> The existence of __close() metamethod (not nil) should make the attribute <close> redundant
>
> When a variable holds a value which has a metatable where __close is not nil then when the variable goes out of scope that value is closed
>
> That would make the postfix attribute <close> redundant
>
> But I am sure I am missing something. Can someone clarify why there is the need for <close>?
>
>     Andrea
> --
> Andrea Vitali
>
>
>
>
>
>
> _______________________________________________
> lua-l mailing list -- lua-l@lists.lua.org
> To unsubscribe send an email to lua-l-leave@lists.lua.org
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org