The Glasswall library is session based. Sessions act as a means to store data against a session ID. The GW2OpenSession function creates a new session.
Synopsis
Create a new session and returns the session ID.
#include "glasswall.core2.api.h"
Session GW2OpenSession(void);
Returns
If successful, the GW2OpenSession function returns a handle, a small positive integer that designates the session. The handle is used as an argument to other API functions to identify the session. If the call fails, the handle will be zero.
Example
#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 */
Synopsis
Creates a new Glasswall session.
/// <summary>
/// Creates a new Glasswall session
/// </summary>
/// <returns>A handle, a small positive integer that designates the session</returns>
public int OpenSession()
Returns
A handle, a small positive integer that designates the session.
Synopsis
Creates a new Glasswall session.
import com.glasswall.core2javabridge.*;
public int GW2OpenSession() throws GlasswallException
Returns
The GW2OpenSession function returns a unique positive int
that designates the session.
A GlasswallException exception will be thrown if a new session cannot be created.
Synopsis
Creates a new Glasswall session.
def open_session(self):
""" Open a new Glasswall session.
Returns:
session (int): An incrementing integer repsenting the current session.
"""
Returns
An incrementing integer representing the current session.
Synopsis
This function requests the creation of a new glasswall session.
**
* 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()
Returns
The handle to the new session, as a small positive integer.