private void Receive() { if (!recving) { LuaCThread.Receive(channel, recvBuf); } }
void Update() { if (channel < 0) { return; } LuaCThread.CThreadRun(channel); Receive(); }
void OnApplicationQuit() { NetworkManager.CloseAll(); LuaCThread.CloseAll(); LuaManager.Dispose(); LuaContext.DisposeAll(); LuaLoader.GetInstance().Clean(); MessagePool.ScriptSendMessage("", MessagePool.OnApplicationQuit, Message.FilterTypeNothing, "OnApplicationQuit"); }
private void _CreateThread(int channel) { int re = LuaCThread.CreateCThread(channel, ReceiveBack); if (re < 0) { Debugger.LogError("LuaCThreadComponent create thread failed->%d", channel); return; } this.channel = channel; }
private void _Send(int toChannel, int gID, int uID, SProto msg) { LuaCThread.SendMsg(channel, toChannel, gID, uID, msg); }