NetworkMgrWrap.cs 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class NetworkMgrWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(NetworkMgr), typeof(Singleton<NetworkMgr>));
  9. L.RegFunction("Init", Init);
  10. L.RegFunction("SetGameServerConnectedLuaFunc", SetGameServerConnectedLuaFunc);
  11. L.RegFunction("ConnectServer", ConnectServer);
  12. L.RegFunction("ResetSending", ResetSending);
  13. L.RegFunction("GetConnectStatus", GetConnectStatus);
  14. L.RegFunction("Disconnect", Disconnect);
  15. L.RegFunction("CloseGameServerConnect", CloseGameServerConnect);
  16. L.RegFunction("SetAesKey", SetAesKey);
  17. L.RegFunction("SendMsg", SendMsg);
  18. L.RegFunction("SendMsgWithRSA", SendMsgWithRSA);
  19. L.RegFunction("SendMsgWithAES", SendMsgWithAES);
  20. L.RegFunction("Update", Update);
  21. L.RegFunction("OnProtocolLua", OnProtocolLua);
  22. L.RegFunction("Resume", Resume);
  23. L.RegFunction("StartReconnect", StartReconnect);
  24. L.RegFunction("HasCmdIdAtConfirmQueue", HasCmdIdAtConfirmQueue);
  25. L.RegFunction("New", _CreateNetworkMgr);
  26. L.RegFunction("__tostring", ToLua.op_ToString);
  27. L.RegConstant("c_RSA_Encrypt", 1);
  28. L.RegConstant("c_AES_Encrypt", 2);
  29. L.RegConstant("c_pingCmdId", 1000);
  30. L.RegConstant("c_pingCmdAck", 1001);
  31. L.RegConstant("c_reconnectCmdAck", 1005);
  32. L.RegVar("gameSrv", get_gameSrv, set_gameSrv);
  33. L.RegVar("m_GameReconnetCount", get_m_GameReconnetCount, set_m_GameReconnetCount);
  34. L.RegVar("isOnlineMode", get_isOnlineMode, set_isOnlineMode);
  35. L.RegVar("heartDelayTime", get_heartDelayTime, null);
  36. L.RegVar("ReceiveMessageFunc", get_ReceiveMessageFunc, set_ReceiveMessageFunc);
  37. L.RegVar("OpenReconnectionWndFunc", get_OpenReconnectionWndFunc, set_OpenReconnectionWndFunc);
  38. L.RegVar("LuaNoitceFunc", get_LuaNoitceFunc, set_LuaNoitceFunc);
  39. L.RegVar("IsLogin", get_IsLogin, set_IsLogin);
  40. L.EndClass();
  41. }
  42. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  43. static int _CreateNetworkMgr(IntPtr L)
  44. {
  45. try
  46. {
  47. int count = LuaDLL.lua_gettop(L);
  48. if (count == 0)
  49. {
  50. NetworkMgr obj = new NetworkMgr();
  51. ToLua.PushObject(L, obj);
  52. return 1;
  53. }
  54. else
  55. {
  56. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: NetworkMgr.New");
  57. }
  58. }
  59. catch (Exception e)
  60. {
  61. return LuaDLL.toluaL_exception(L, e);
  62. }
  63. }
  64. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  65. static int Init(IntPtr L)
  66. {
  67. try
  68. {
  69. ToLua.CheckArgsCount(L, 1);
  70. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  71. obj.Init();
  72. return 0;
  73. }
  74. catch (Exception e)
  75. {
  76. return LuaDLL.toluaL_exception(L, e);
  77. }
  78. }
  79. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  80. static int SetGameServerConnectedLuaFunc(IntPtr L)
  81. {
  82. try
  83. {
  84. ToLua.CheckArgsCount(L, 2);
  85. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  86. LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2);
  87. obj.SetGameServerConnectedLuaFunc(arg0);
  88. return 0;
  89. }
  90. catch (Exception e)
  91. {
  92. return LuaDLL.toluaL_exception(L, e);
  93. }
  94. }
  95. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  96. static int ConnectServer(IntPtr L)
  97. {
  98. try
  99. {
  100. ToLua.CheckArgsCount(L, 3);
  101. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  102. string arg0 = ToLua.CheckString(L, 2);
  103. int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
  104. bool o = obj.ConnectServer(arg0, arg1);
  105. LuaDLL.lua_pushboolean(L, o);
  106. return 1;
  107. }
  108. catch (Exception e)
  109. {
  110. return LuaDLL.toluaL_exception(L, e);
  111. }
  112. }
  113. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  114. static int ResetSending(IntPtr L)
  115. {
  116. try
  117. {
  118. ToLua.CheckArgsCount(L, 1);
  119. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  120. obj.ResetSending();
  121. return 0;
  122. }
  123. catch (Exception e)
  124. {
  125. return LuaDLL.toluaL_exception(L, e);
  126. }
  127. }
  128. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  129. static int GetConnectStatus(IntPtr L)
  130. {
  131. try
  132. {
  133. ToLua.CheckArgsCount(L, 1);
  134. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  135. bool o = obj.GetConnectStatus();
  136. LuaDLL.lua_pushboolean(L, o);
  137. return 1;
  138. }
  139. catch (Exception e)
  140. {
  141. return LuaDLL.toluaL_exception(L, e);
  142. }
  143. }
  144. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  145. static int Disconnect(IntPtr L)
  146. {
  147. try
  148. {
  149. ToLua.CheckArgsCount(L, 1);
  150. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  151. obj.Disconnect();
  152. return 0;
  153. }
  154. catch (Exception e)
  155. {
  156. return LuaDLL.toluaL_exception(L, e);
  157. }
  158. }
  159. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  160. static int CloseGameServerConnect(IntPtr L)
  161. {
  162. try
  163. {
  164. ToLua.CheckArgsCount(L, 1);
  165. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  166. obj.CloseGameServerConnect();
  167. return 0;
  168. }
  169. catch (Exception e)
  170. {
  171. return LuaDLL.toluaL_exception(L, e);
  172. }
  173. }
  174. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  175. static int SetAesKey(IntPtr L)
  176. {
  177. try
  178. {
  179. ToLua.CheckArgsCount(L, 2);
  180. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  181. string arg0 = ToLua.CheckString(L, 2);
  182. obj.SetAesKey(arg0);
  183. return 0;
  184. }
  185. catch (Exception e)
  186. {
  187. return LuaDLL.toluaL_exception(L, e);
  188. }
  189. }
  190. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  191. static int SendMsg(IntPtr L)
  192. {
  193. try
  194. {
  195. int count = LuaDLL.lua_gettop(L);
  196. if (count == 3)
  197. {
  198. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  199. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  200. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  201. bool o = obj.SendMsg(arg0, arg1);
  202. LuaDLL.lua_pushboolean(L, o);
  203. return 1;
  204. }
  205. else if (count == 4)
  206. {
  207. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  208. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  209. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  210. bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
  211. bool o = obj.SendMsg(arg0, arg1, arg2);
  212. LuaDLL.lua_pushboolean(L, o);
  213. return 1;
  214. }
  215. else if (count == 5)
  216. {
  217. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  218. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  219. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  220. bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
  221. bool arg3 = LuaDLL.luaL_checkboolean(L, 5);
  222. bool o = obj.SendMsg(arg0, arg1, arg2, arg3);
  223. LuaDLL.lua_pushboolean(L, o);
  224. return 1;
  225. }
  226. else
  227. {
  228. return LuaDLL.luaL_throw(L, "invalid arguments to method: NetworkMgr.SendMsg");
  229. }
  230. }
  231. catch (Exception e)
  232. {
  233. return LuaDLL.toluaL_exception(L, e);
  234. }
  235. }
  236. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  237. static int SendMsgWithRSA(IntPtr L)
  238. {
  239. try
  240. {
  241. int count = LuaDLL.lua_gettop(L);
  242. if (count == 3)
  243. {
  244. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  245. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  246. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  247. bool o = obj.SendMsgWithRSA(arg0, arg1);
  248. LuaDLL.lua_pushboolean(L, o);
  249. return 1;
  250. }
  251. else if (count == 4)
  252. {
  253. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  254. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  255. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  256. bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
  257. bool o = obj.SendMsgWithRSA(arg0, arg1, arg2);
  258. LuaDLL.lua_pushboolean(L, o);
  259. return 1;
  260. }
  261. else if (count == 5)
  262. {
  263. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  264. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  265. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  266. bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
  267. bool arg3 = LuaDLL.luaL_checkboolean(L, 5);
  268. bool o = obj.SendMsgWithRSA(arg0, arg1, arg2, arg3);
  269. LuaDLL.lua_pushboolean(L, o);
  270. return 1;
  271. }
  272. else
  273. {
  274. return LuaDLL.luaL_throw(L, "invalid arguments to method: NetworkMgr.SendMsgWithRSA");
  275. }
  276. }
  277. catch (Exception e)
  278. {
  279. return LuaDLL.toluaL_exception(L, e);
  280. }
  281. }
  282. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  283. static int SendMsgWithAES(IntPtr L)
  284. {
  285. try
  286. {
  287. int count = LuaDLL.lua_gettop(L);
  288. if (count == 3)
  289. {
  290. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  291. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  292. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  293. bool o = obj.SendMsgWithAES(arg0, arg1);
  294. LuaDLL.lua_pushboolean(L, o);
  295. return 1;
  296. }
  297. else if (count == 4)
  298. {
  299. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  300. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  301. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  302. bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
  303. bool o = obj.SendMsgWithAES(arg0, arg1, arg2);
  304. LuaDLL.lua_pushboolean(L, o);
  305. return 1;
  306. }
  307. else if (count == 5)
  308. {
  309. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  310. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  311. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  312. bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
  313. bool arg3 = LuaDLL.luaL_checkboolean(L, 5);
  314. bool o = obj.SendMsgWithAES(arg0, arg1, arg2, arg3);
  315. LuaDLL.lua_pushboolean(L, o);
  316. return 1;
  317. }
  318. else
  319. {
  320. return LuaDLL.luaL_throw(L, "invalid arguments to method: NetworkMgr.SendMsgWithAES");
  321. }
  322. }
  323. catch (Exception e)
  324. {
  325. return LuaDLL.toluaL_exception(L, e);
  326. }
  327. }
  328. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  329. static int Update(IntPtr L)
  330. {
  331. try
  332. {
  333. ToLua.CheckArgsCount(L, 1);
  334. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  335. obj.Update();
  336. return 0;
  337. }
  338. catch (Exception e)
  339. {
  340. return LuaDLL.toluaL_exception(L, e);
  341. }
  342. }
  343. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  344. static int OnProtocolLua(IntPtr L)
  345. {
  346. try
  347. {
  348. ToLua.CheckArgsCount(L, 3);
  349. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  350. byte[] arg0 = ToLua.CheckByteBuffer(L, 2);
  351. ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
  352. obj.OnProtocolLua(arg0, arg1);
  353. return 0;
  354. }
  355. catch (Exception e)
  356. {
  357. return LuaDLL.toluaL_exception(L, e);
  358. }
  359. }
  360. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  361. static int Resume(IntPtr L)
  362. {
  363. try
  364. {
  365. ToLua.CheckArgsCount(L, 1);
  366. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  367. obj.Resume();
  368. return 0;
  369. }
  370. catch (Exception e)
  371. {
  372. return LuaDLL.toluaL_exception(L, e);
  373. }
  374. }
  375. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  376. static int StartReconnect(IntPtr L)
  377. {
  378. try
  379. {
  380. ToLua.CheckArgsCount(L, 1);
  381. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  382. obj.StartReconnect();
  383. return 0;
  384. }
  385. catch (Exception e)
  386. {
  387. return LuaDLL.toluaL_exception(L, e);
  388. }
  389. }
  390. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  391. static int HasCmdIdAtConfirmQueue(IntPtr L)
  392. {
  393. try
  394. {
  395. ToLua.CheckArgsCount(L, 2);
  396. NetworkMgr obj = (NetworkMgr)ToLua.CheckObject<NetworkMgr>(L, 1);
  397. ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2);
  398. bool o = obj.HasCmdIdAtConfirmQueue(arg0);
  399. LuaDLL.lua_pushboolean(L, o);
  400. return 1;
  401. }
  402. catch (Exception e)
  403. {
  404. return LuaDLL.toluaL_exception(L, e);
  405. }
  406. }
  407. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  408. static int get_gameSrv(IntPtr L)
  409. {
  410. object o = null;
  411. try
  412. {
  413. o = ToLua.ToObject(L, 1);
  414. NetworkMgr obj = (NetworkMgr)o;
  415. GameServerConnector ret = obj.gameSrv;
  416. ToLua.PushObject(L, ret);
  417. return 1;
  418. }
  419. catch(Exception e)
  420. {
  421. return LuaDLL.toluaL_exception(L, e, o, "attempt to index gameSrv on a nil value");
  422. }
  423. }
  424. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  425. static int get_m_GameReconnetCount(IntPtr L)
  426. {
  427. object o = null;
  428. try
  429. {
  430. o = ToLua.ToObject(L, 1);
  431. NetworkMgr obj = (NetworkMgr)o;
  432. int ret = obj.m_GameReconnetCount;
  433. LuaDLL.lua_pushinteger(L, ret);
  434. return 1;
  435. }
  436. catch(Exception e)
  437. {
  438. return LuaDLL.toluaL_exception(L, e, o, "attempt to index m_GameReconnetCount on a nil value");
  439. }
  440. }
  441. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  442. static int get_isOnlineMode(IntPtr L)
  443. {
  444. object o = null;
  445. try
  446. {
  447. o = ToLua.ToObject(L, 1);
  448. NetworkMgr obj = (NetworkMgr)o;
  449. bool ret = obj.isOnlineMode;
  450. LuaDLL.lua_pushboolean(L, ret);
  451. return 1;
  452. }
  453. catch(Exception e)
  454. {
  455. return LuaDLL.toluaL_exception(L, e, o, "attempt to index isOnlineMode on a nil value");
  456. }
  457. }
  458. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  459. static int get_heartDelayTime(IntPtr L)
  460. {
  461. object o = null;
  462. try
  463. {
  464. o = ToLua.ToObject(L, 1);
  465. NetworkMgr obj = (NetworkMgr)o;
  466. int ret = obj.heartDelayTime;
  467. LuaDLL.lua_pushinteger(L, ret);
  468. return 1;
  469. }
  470. catch(Exception e)
  471. {
  472. return LuaDLL.toluaL_exception(L, e, o, "attempt to index heartDelayTime on a nil value");
  473. }
  474. }
  475. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  476. static int get_ReceiveMessageFunc(IntPtr L)
  477. {
  478. object o = null;
  479. try
  480. {
  481. o = ToLua.ToObject(L, 1);
  482. NetworkMgr obj = (NetworkMgr)o;
  483. LuaInterface.LuaFunction ret = obj.ReceiveMessageFunc;
  484. ToLua.Push(L, ret);
  485. return 1;
  486. }
  487. catch(Exception e)
  488. {
  489. return LuaDLL.toluaL_exception(L, e, o, "attempt to index ReceiveMessageFunc on a nil value");
  490. }
  491. }
  492. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  493. static int get_OpenReconnectionWndFunc(IntPtr L)
  494. {
  495. object o = null;
  496. try
  497. {
  498. o = ToLua.ToObject(L, 1);
  499. NetworkMgr obj = (NetworkMgr)o;
  500. LuaInterface.LuaFunction ret = obj.OpenReconnectionWndFunc;
  501. ToLua.Push(L, ret);
  502. return 1;
  503. }
  504. catch(Exception e)
  505. {
  506. return LuaDLL.toluaL_exception(L, e, o, "attempt to index OpenReconnectionWndFunc on a nil value");
  507. }
  508. }
  509. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  510. static int get_LuaNoitceFunc(IntPtr L)
  511. {
  512. object o = null;
  513. try
  514. {
  515. o = ToLua.ToObject(L, 1);
  516. NetworkMgr obj = (NetworkMgr)o;
  517. LuaInterface.LuaFunction ret = obj.LuaNoitceFunc;
  518. ToLua.Push(L, ret);
  519. return 1;
  520. }
  521. catch(Exception e)
  522. {
  523. return LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaNoitceFunc on a nil value");
  524. }
  525. }
  526. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  527. static int get_IsLogin(IntPtr L)
  528. {
  529. object o = null;
  530. try
  531. {
  532. o = ToLua.ToObject(L, 1);
  533. NetworkMgr obj = (NetworkMgr)o;
  534. bool ret = obj.IsLogin;
  535. LuaDLL.lua_pushboolean(L, ret);
  536. return 1;
  537. }
  538. catch(Exception e)
  539. {
  540. return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsLogin on a nil value");
  541. }
  542. }
  543. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  544. static int set_gameSrv(IntPtr L)
  545. {
  546. object o = null;
  547. try
  548. {
  549. o = ToLua.ToObject(L, 1);
  550. NetworkMgr obj = (NetworkMgr)o;
  551. GameServerConnector arg0 = (GameServerConnector)ToLua.CheckObject<GameServerConnector>(L, 2);
  552. obj.gameSrv = arg0;
  553. return 0;
  554. }
  555. catch(Exception e)
  556. {
  557. return LuaDLL.toluaL_exception(L, e, o, "attempt to index gameSrv on a nil value");
  558. }
  559. }
  560. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  561. static int set_m_GameReconnetCount(IntPtr L)
  562. {
  563. object o = null;
  564. try
  565. {
  566. o = ToLua.ToObject(L, 1);
  567. NetworkMgr obj = (NetworkMgr)o;
  568. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  569. obj.m_GameReconnetCount = arg0;
  570. return 0;
  571. }
  572. catch(Exception e)
  573. {
  574. return LuaDLL.toluaL_exception(L, e, o, "attempt to index m_GameReconnetCount on a nil value");
  575. }
  576. }
  577. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  578. static int set_isOnlineMode(IntPtr L)
  579. {
  580. object o = null;
  581. try
  582. {
  583. o = ToLua.ToObject(L, 1);
  584. NetworkMgr obj = (NetworkMgr)o;
  585. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  586. obj.isOnlineMode = arg0;
  587. return 0;
  588. }
  589. catch(Exception e)
  590. {
  591. return LuaDLL.toluaL_exception(L, e, o, "attempt to index isOnlineMode on a nil value");
  592. }
  593. }
  594. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  595. static int set_ReceiveMessageFunc(IntPtr L)
  596. {
  597. object o = null;
  598. try
  599. {
  600. o = ToLua.ToObject(L, 1);
  601. NetworkMgr obj = (NetworkMgr)o;
  602. LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2);
  603. obj.ReceiveMessageFunc = arg0;
  604. return 0;
  605. }
  606. catch(Exception e)
  607. {
  608. return LuaDLL.toluaL_exception(L, e, o, "attempt to index ReceiveMessageFunc on a nil value");
  609. }
  610. }
  611. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  612. static int set_OpenReconnectionWndFunc(IntPtr L)
  613. {
  614. object o = null;
  615. try
  616. {
  617. o = ToLua.ToObject(L, 1);
  618. NetworkMgr obj = (NetworkMgr)o;
  619. LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2);
  620. obj.OpenReconnectionWndFunc = arg0;
  621. return 0;
  622. }
  623. catch(Exception e)
  624. {
  625. return LuaDLL.toluaL_exception(L, e, o, "attempt to index OpenReconnectionWndFunc on a nil value");
  626. }
  627. }
  628. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  629. static int set_LuaNoitceFunc(IntPtr L)
  630. {
  631. object o = null;
  632. try
  633. {
  634. o = ToLua.ToObject(L, 1);
  635. NetworkMgr obj = (NetworkMgr)o;
  636. LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2);
  637. obj.LuaNoitceFunc = arg0;
  638. return 0;
  639. }
  640. catch(Exception e)
  641. {
  642. return LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaNoitceFunc on a nil value");
  643. }
  644. }
  645. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  646. static int set_IsLogin(IntPtr L)
  647. {
  648. object o = null;
  649. try
  650. {
  651. o = ToLua.ToObject(L, 1);
  652. NetworkMgr obj = (NetworkMgr)o;
  653. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  654. obj.IsLogin = arg0;
  655. return 0;
  656. }
  657. catch(Exception e)
  658. {
  659. return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsLogin on a nil value");
  660. }
  661. }
  662. }