public void ConnectToGS(GameMatch.Type uMatchType, string ip, int port) { if (m_gameConn != null) { CloseGameServerConn(); } if (uMatchType == GameMatch.Type.ePVP_1PLUS || uMatchType == GameMatch.Type.ePVP_3On3) { if (m_gameConn == null) { /* #if UNITY_EDITOR * int timeout = 0; #else * int timeout = 5000; #endif */ int timeout = 6; m_gameConn = new NetworkConn(m_gameMsgHandler, "Game", NetworkConn.Type.eGameServer, timeout); m_gameConn.AddEventListener(this); } } else { m_gameConn = new VirtualNetworkConnSimple(m_gameMsgHandler); m_gameConn.AddEventListener(this); VirtualGameServer.Instance = new VirtualGameServer(); } m_gameConn.Connect(ip, port); }
static int Connect(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); NetworkConn obj = (NetworkConn)LuaScriptMgr.GetNetObjectSelf(L, 1, "NetworkConn"); string arg0 = LuaScriptMgr.GetLuaString(L, 2); int arg1 = (int)LuaScriptMgr.GetNumber(L, 3); obj.Connect(arg0, arg1); return(0); }
public void ConnectToGS(string ip, int port) { if (m_gameConn != null) { CloseGameServerConn(); } if (m_gameConn == null) { m_gameConn = new NetworkConn(m_gameMsgHandler, "Game", NetworkConn.Type.eGameServer, 0); m_gameConn.AddEventListener(this); } m_gameConn.Connect(ip, port); }
public void ConnectToLS(string ip, int port) { if (m_loginConn != null) { CloseLoginConn(); } if (m_loginConn == null) { Debug.Log("New login conn."); m_loginConn = new NetworkConn(m_loginMsgHandler, "Login", NetworkConn.Type.eLoginServer, 6); m_loginConn.AddEventListener(this); } m_loginConn.Connect(ip, port); m_loginConn.EnableTimeout(false); }
public void ConnectToPS(string ip, int port) { if (m_platConn != null) { ClosePlatConn(); } if (m_platConn == null) { /* #if UNITY_EDITOR * int timeout = 0; #else * int timeout = 5000; #endif */ int timeout = 6; m_platConn = new NetworkConn(m_platMsgHandler, "Plat", NetworkConn.Type.ePlatformServer, timeout); CheatingDeath.Instance.mAntiSpeedUp.SetWatchTarget(m_platConn); m_platConn.AddEventListener(this); } m_platConn.Connect(ip, port); }