/** Binds cLuaUDPEndpoint::EnableBroadcasts */
static int tolua_cUDPEndpoint_EnableBroadcasts(lua_State * L)
{
	// Function signature:
	// EndpointInstance:EnableBroadcasts()

	cLuaState S(L);
	if (
		!S.CheckParamUserType(1, "cUDPEndpoint") ||
		!S.CheckParamEnd(2)
	)
	{
		return 0;
	}
	
	// Get the endpoint:
	if (lua_isnil(L, 1))
	{
		LOGWARNING("cUDPEndpoint:EnableBroadcasts(): invalid endpoint object. Stack trace:");
		S.LogStackTrace();
		return 0;
	}
	auto Endpoint = *static_cast<cLuaUDPEndpoint **>(lua_touserdata(L, 1));

	// Enable the broadcasts:
	Endpoint->EnableBroadcasts();
	return 0;
}
Пример #2
0
/** Binds cLuaUDPEndpoint::EnableBroadcasts */
static int tolua_cUDPEndpoint_EnableBroadcasts(lua_State * L)
{
	// Function signature:
	// EndpointInstance:EnableBroadcasts()

	cLuaState S(L);
	if (
		!S.CheckParamSelf("cUDPEndpoint") ||
		!S.CheckParamEnd(2)
	)
	{
		return 0;
	}

	// Get the endpoint:
	auto endpoint = *static_cast<cLuaUDPEndpoint **>(lua_touserdata(L, 1));
	ASSERT(endpoint != nullptr);

	// Enable the broadcasts:
	endpoint->EnableBroadcasts();
	return 0;
}