lua-users home
lua-l archive

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


That is a pretty simple thing. If I made a simple patch to
that effect, would you consider adopting it?

It would depend on a series of factors. The most
important is whether it can be done just by *adding* code,
instead of changing code. I still believe it can.

Can't you you change the __index table of the metatables for
classes tcp{server}, tcp{client} and tcp{master} to
something you can use to trap method calls? You can even
save the previous methods as upvalues of the new ones.
I haven't tried, but it looks like you might be able to do
this without changing anything in LuaSocket.

The other factor would be how popular such a feature
(assuming it can't be done already) would be.