public void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { foreach (NFINet.OnSocketEvent handler in mxEventHandlerList) { handler(nSockIndex, eEvent, pNet); } }
public void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { foreach(NFINet.OnSocketEvent handler in mxEventHandlerList) { handler(nSockIndex, eEvent, pNet); } }
public void RegisterPackCallback(int nMsgdID, NFINet.OnRecivePack xEventHandler) { List<NFINet.OnRecivePack> xList; if(!mxPackHandlerDic.TryGetValue(nMsgdID, out xList)) { xList = new List<NFINet.OnRecivePack>(); } xList.Add(xEventHandler); }
public void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet) { List<NFINet.OnRecivePack> xList; if(mxPackHandlerDic.TryGetValue(nMsgID, out xList)) { foreach (NFINet.OnRecivePack handler in xList) { handler(nSockIndex, nMsgID, msg, pNet); } } else if(mxPackHandlerDic.TryGetValue(-1, out xList)) { foreach (NFINet.OnRecivePack handler in xList) { handler(nSockIndex, nMsgID, msg, pNet); } } }
protected void OnNetRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet) { switch ((NFMsg.EGameMsgID)nMsgID) { case NFMsg.EGameMsgID.EGMI_STS_HEART_BEAT: break; case NFMsg.EGameMsgID.EGMI_MTL_WORLD_REGISTERED: OnWorldRegisteredProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_MTL_WORLD_UNREGISTERED: OnWorldUnRegisteredProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_MTL_WORLD_REFRESH: OnRefreshWorldInfoProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_REGISTERED: OnLoginRegisteredProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_UNREGISTERED: OnLoginUnRegisteredProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_LTM_LOGIN_REFRESH: OnRefreshLoginInfoProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_REQ_CONNECT_WORLD: OnSelectWorldProcess(nSockIndex, nMsgID, msg); break; case NFMsg.EGameMsgID.EGMI_ACK_CONNECT_WORLD: OnSelectServerResultProcess(nSockIndex, nMsgID, msg); break; default: break; } }
public void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet) { List <NFINet.OnRecivePack> xList; if (mxPackHandlerDic.TryGetValue(nMsgID, out xList)) { foreach (NFINet.OnRecivePack handler in xList) { handler(nSockIndex, nMsgID, msg, pNet); } } else if (mxPackHandlerDic.TryGetValue(-1, out xList)) { foreach (NFINet.OnRecivePack handler in xList) { handler(nSockIndex, nMsgID, msg, pNet); } } }
private void OnRecivePack(UInt32 nSockIndex, UInt16 nMsgID, string msg, NFINet pNet) { GetNetHandler().OnRecivePack(nSockIndex, nMsgID, msg, pNet); }
private void OnSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { GetNetHandler().OnSocketEvent(nSockIndex, eEvent, pNet); }
////////////////////////////////////////////////////////////////////////// protected void OnNetSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { switch (eEvent) { case NFINet.NF_NET_EVENT.NF_NET_EVENT_CONNECTED: { //OnClientDisconnect(nSockIndex); } break; default: { //OnClientConnected(nSockIndex); } break; } }
////////////////////////////////////////////////////////////////////////// protected void OnNetSocketEvent(UInt32 nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { switch(eEvent) { case NFINet.NF_NET_EVENT.NF_NET_EVENT_CONNECTED: { //OnClientDisconnect(nSockIndex); } break; default: { //OnClientConnected(nSockIndex); } break; } }
protected int OnSocketClientEvent(int nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { return(0); }
protected int OnSocketClientEvent(int nSockIndex, NFINet.NF_NET_EVENT eEvent, NFINet pNet) { return 0; }
public void RegisterEventCallback(NFINet.OnSocketEvent xEventHandler) { mxEventHandlerList.Add(xEventHandler); }