639 lines
26 KiB
C#
639 lines
26 KiB
C#
#if USE_UNI_LUA
|
|
using LuaAPI = UniLua.Lua;
|
|
using RealStatePtr = UniLua.ILuaState;
|
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
#else
|
|
using LuaAPI = XLua.LuaDLL.Lua;
|
|
using RealStatePtr = System.IntPtr;
|
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
#endif
|
|
|
|
using XLua;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace XLua.CSObjectWrap
|
|
{
|
|
using Utils = XLua.Utils;
|
|
public class BFNetConnectConfigurationWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.NetConnectConfiguration);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 3, 16, 14);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "EnableMessageType", _m_EnableMessageType);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisableMessageType", _m_DisableMessageType);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsMessageTypeEnabled", _m_IsMessageTypeEnabled);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ServiceType", _g_get_ServiceType);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "UniqueIdentifier", _g_get_UniqueIdentifier);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "InitializeExchangeRc4Key", _g_get_InitializeExchangeRc4Key);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SendBufferCapacity", _g_get_SendBufferCapacity);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ReceiveBufferCapacity", _g_get_ReceiveBufferCapacity);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "MessagePoolCapacity", _g_get_MessagePoolCapacity);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "AlreadySendMessageCacheCount", _g_get_AlreadySendMessageCacheCount);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "EnableSilenceReconnect", _g_get_EnableSilenceReconnect);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "AutoReconnectCount", _g_get_AutoReconnectCount);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ReconnectTimeoutTime", _g_get_ReconnectTimeoutTime);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ReconnectBaseInterval", _g_get_ReconnectBaseInterval);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "EnableHeartBeat", _g_get_EnableHeartBeat);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "HeartBeatInterval", _g_get_HeartBeatInterval);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "MaxHeartBeatMissCount", _g_get_MaxHeartBeatMissCount);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "EnableStatistics", _g_get_EnableStatistics);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ConnectTimeout", _g_get_ConnectTimeout);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "InitializeExchangeRc4Key", _s_set_InitializeExchangeRc4Key);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "SendBufferCapacity", _s_set_SendBufferCapacity);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ReceiveBufferCapacity", _s_set_ReceiveBufferCapacity);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "MessagePoolCapacity", _s_set_MessagePoolCapacity);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "AlreadySendMessageCacheCount", _s_set_AlreadySendMessageCacheCount);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "EnableSilenceReconnect", _s_set_EnableSilenceReconnect);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "AutoReconnectCount", _s_set_AutoReconnectCount);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ReconnectTimeoutTime", _s_set_ReconnectTimeoutTime);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ReconnectBaseInterval", _s_set_ReconnectBaseInterval);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "EnableHeartBeat", _s_set_EnableHeartBeat);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "HeartBeatInterval", _s_set_HeartBeatInterval);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "MaxHeartBeatMissCount", _s_set_MaxHeartBeatMissCount);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "EnableStatistics", _s_set_EnableStatistics);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ConnectTimeout", _s_set_ConnectTimeout);
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable<BF.NetServiceType>(L, 2) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
BF.NetServiceType _serviceType;translator.Get(L, 2, out _serviceType);
|
|
string _uniqueIdentifier = LuaAPI.lua_tostring(L, 3);
|
|
|
|
var gen_ret = new BF.NetConnectConfiguration(_serviceType, _uniqueIdentifier);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to BF.NetConnectConfiguration constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_EnableMessageType(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.NetIncomingMessageType _type;translator.Get(L, 2, out _type);
|
|
|
|
gen_to_be_invoked.EnableMessageType( _type );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_DisableMessageType(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.NetIncomingMessageType _type;translator.Get(L, 2, out _type);
|
|
|
|
gen_to_be_invoked.DisableMessageType( _type );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_IsMessageTypeEnabled(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.NetIncomingMessageType _type;translator.Get(L, 2, out _type);
|
|
|
|
var gen_ret = gen_to_be_invoked.IsMessageTypeEnabled( _type );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ServiceType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
translator.PushBFNetServiceType(L, gen_to_be_invoked.ServiceType);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_UniqueIdentifier(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.UniqueIdentifier);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_InitializeExchangeRc4Key(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.InitializeExchangeRc4Key);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_SendBufferCapacity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.SendBufferCapacity);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ReceiveBufferCapacity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ReceiveBufferCapacity);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_MessagePoolCapacity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.MessagePoolCapacity);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_AlreadySendMessageCacheCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.AlreadySendMessageCacheCount);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_EnableSilenceReconnect(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.EnableSilenceReconnect);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_AutoReconnectCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.AutoReconnectCount);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ReconnectTimeoutTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ReconnectTimeoutTime);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ReconnectBaseInterval(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ReconnectBaseInterval);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_EnableHeartBeat(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.EnableHeartBeat);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_HeartBeatInterval(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.HeartBeatInterval);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_MaxHeartBeatMissCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.MaxHeartBeatMissCount);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_EnableStatistics(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.EnableStatistics);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ConnectTimeout(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ConnectTimeout);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_InitializeExchangeRc4Key(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.InitializeExchangeRc4Key = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_SendBufferCapacity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.SendBufferCapacity = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ReceiveBufferCapacity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ReceiveBufferCapacity = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_MessagePoolCapacity(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.MessagePoolCapacity = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_AlreadySendMessageCacheCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.AlreadySendMessageCacheCount = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_EnableSilenceReconnect(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.EnableSilenceReconnect = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_AutoReconnectCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.AutoReconnectCount = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ReconnectTimeoutTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ReconnectTimeoutTime = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ReconnectBaseInterval(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ReconnectBaseInterval = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_EnableHeartBeat(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.EnableHeartBeat = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_HeartBeatInterval(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.HeartBeatInterval = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_MaxHeartBeatMissCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.MaxHeartBeatMissCount = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_EnableStatistics(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.EnableStatistics = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ConnectTimeout(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.NetConnectConfiguration gen_to_be_invoked = (BF.NetConnectConfiguration)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ConnectTimeout = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|