static int _m_Connect(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); U3DUtility.TcpLayer __cl_gen_to_be_invoked = (U3DUtility.TcpLayer)translator.FastGetCSObj(L, 1); { string ip = LuaAPI.lua_tostring(L, 2); int port = LuaAPI.xlua_tointeger(L, 3); U3DUtility.TcpLayer.OnConnectEvent connEvent = translator.GetDelegate <U3DUtility.TcpLayer.OnConnectEvent>(L, 4); U3DUtility.TcpLayer.OnDisconnectEvent disconnEvent = translator.GetDelegate <U3DUtility.TcpLayer.OnDisconnectEvent>(L, 5); U3DUtility.TcpLayer.OnRecvEvent recvEvent = translator.GetDelegate <U3DUtility.TcpLayer.OnRecvEvent>(L, 6); __cl_gen_to_be_invoked.Connect(ip, port, connEvent, disconnEvent, recvEvent); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_RemoveRecvEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); U3DUtility.TcpLayer __cl_gen_to_be_invoked = (U3DUtility.TcpLayer)translator.FastGetCSObj(L, 1); { U3DUtility.TcpLayer.OnRecvEvent recvEvent = translator.GetDelegate <U3DUtility.TcpLayer.OnRecvEvent>(L, 2); __cl_gen_to_be_invoked.RemoveRecvEvent(recvEvent); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }