lua-users home
lua-l archive

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


Hi Adrian,

The code for setting multicast ttl (LuaSocket 2.02 and earlier) is :

int opt_ip_multicast_ttl(lua_State *L, p_socket ps)
{
   int val = (int) luaL_checknumber(L, 3);    /* obj, name, int */
   return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &val, sizeof(val));
}

where I expected something like :

int opt_ip_multicast_ttl(lua_State *L, p_socket ps)
{
   int val = (int) luaL_checknumber(L, 3);    /* obj, name, int */
return opt_set(L, ps, IPPROTO_IP, IP_MULTICAST_TTL, (char *) &val, sizeof(val));
}


Also, can we have the option to set the outbound multicast interface ? The call to be implemented is a wrapper for :

setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr));

Yes, let's work together on this. The multi-cast issue and a
bug on select are the only remaining problems before I
release LuaSocket 2.0.3.

Regards,
Diego