Skip to content

Conversation

@Nicell
Copy link
Collaborator

@Nicell Nicell commented Jan 11, 2026

I'd like to get websockets in upstream, as I've been using my branch of it for a bit with success. First, though, splitting net into server and client should make it cleaner and easier to review the upcoming websocket PRs... Also the file was getting really long.

Comment on lines +237 to +264
int luaopen_net(lua_State* L)
{
globalCurlInit();

luaL_register(L, "net", net::lib);

return 1;
}

int luteopen_net(lua_State* L)
{
globalCurlInit();

lua_createtable(L, 0, std::size(net::lib));

for (auto& [name, func] : net::lib)
{
if (!name || !func)
break;

lua_pushcfunction(L, func, name);
lua_setfield(L, -2, name);
}

lua_setreadonly(L, -1, 1);

return 1;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Environment setup seems to be broken now with how they're split. I want to make all of the modules/submodules for the runtime libraries more uniform here, but in general, we should have open for @lute/net/client and open for @lute/net/server and an open for @lute/net that, at the very least, exposes those two tables as client and server within it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants