示例#1
0
        public static void StartUp(string Ip, int Port)
        {
            ClientSocket.Connect(IPAddress.Parse(Ip), Port);
            SecureClientSocket.Connect(IPAddress.Parse(Ip), Port);

            SNetServerProcess.StartProcess();
            SNetPlayerConnector.Connect();

            Debug.Log("Client running!");
        }
示例#2
0
        public static bool Destruct()
        {
            if (IsInit)
            {
                SNetClientProcess.StopProcess();
                ClientSocket.Close();
                ClientSocket = null;

                SecureClientSocket.Close();
                SecureClientSocket = null;

                IsInit   = false;
                IsClient = false;

                Debug.Log("Client is close!");

                return(true);
            }
            return(false);
        }