/// <summary> /// Create pipe session for Houdini Engine. /// </summary> /// <param name="pipeName"></param> /// <param name="autoClose"></param> /// <param name="timeout"></param> /// <returns>True if successfully created session.</returns> public static bool CreateThriftPipeSession(string pipeName, bool autoClose, float timeout, bool logError) { CheckAndCloseExistingSession(); _defaultSession = CreateSessionObject(); return _defaultSession.CreateThriftPipeSession(true, pipeName, autoClose, timeout, logError); }
/// <summary> /// Close default (if valid) and open a new session. /// </summary> /// <returns>True if created a new session.</returns> public static bool RestartSession() { // Close and reconnect if session object exists. // Otherwise try reconnecting based on last session info. // If both fail, just create new. if (_defaultSession != null) { return _defaultSession.RestartSession(); } else { bool bResult = LoadStoredDefaultSession(); if (!bResult) { HEU_SessionBase sessionBase = CreateSessionObject(); if (sessionBase.CreateThriftPipeSession(true)) { _defaultSession = sessionBase; bResult = true; } } return bResult; } }