GW2OpenSession
Glasswall ライブラリはセッションベースです。セッションは、セッション ID に対してデータを保存する手段として機能します。 GW2OpenSession 関数は新しいセッションを作成します。
- C++
- C#
- Java
- Python
- JavaScript
概要
新しいセッションを作成し、セッション ID を返します
#include "glasswall.core2.api.h"
Session GW2OpenSession(void);
戻り値
成功した場合、GW2OpenSession 関数はハンドルを返します。これはセッションを示す小さな正の整数です。 このハンドルは、セッションを識別するために他の API 関数への引数として使用されます。 呼び出しに失敗した場合、ハンドルはゼロになります。
例
#include "glasswall.core2.api.h"
Session session = GW2OpenSession();
if (!session)
/* deal with error */
else
/* use session to refer to the session in other API function calls */
if (GW2CloseSession(session))
/* error closing session */
概要
新しい Glasswall セッションを作成します
/// <summary>
/// Creates a new Glasswall session
/// </summary>
/// <returns>A handle, a small positive integer that designates the session</returns>
public int OpenSession()
戻り値
セッションを示す、小さな正の整数であるハンドル
概要
import com.glasswall.core2javabridge.*;
public int GW2OpenSession() throws GlasswallException
戻り値
GW2OpenSession 関数は、セッションを示す一意の正の int を返します。
新しいセッションを作成できない場合は、GlasswallException 例外がスローされます。
概要
新しい Glasswall セッションを開きます。
def open_session(self):
""" Open a new Glasswall session.
Returns:
session (int): An incrementing integer repsenting the current session.
"""
戻り値
現在のセッションを表す増加していく整数
概要
この関数は、新しい glasswall セッションの作成を要求します。
**
* This function requests the creation of a new glasswall session.
* @returns {number} The handle to the new session, as a small positive integer. Failure returns 0.
*/
GW2OpenSession()
戻り値
新しいセッションへのハンドル。小さな正の整数として返されます。