01-09-2015, 08:36 PM
As for the Lua API, I think I'll change the params around; instead of listing all the callback functions as separate parameters, I'll have the API functions take a single parameter, a table, that will contain all the callbacks in a map:
-- Callback-passing example: local Callbacks = { OnConnected = function (a_Link) ... end, OnDataReceived = function (a_Link, a_Data) ... end, OnLinkDisconnected = function (a_Link) ... end, ... } cNetwork:Connect("google.com", 80, Callbacks)This is how the XML parser works, I think it's better than having a million parameters. Also it allows us to expand the API later on with new callbacks, when needed, without breaking existing plugins (much).