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!"); }
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); }