Skip to content

session 🔗

Session 🔗

Session(flags)
Source code in vaccel/session.py
def __init__(self, flags):
    """Create a new vAccel session"""

    self._inner = ffi.new("struct vaccel_session *")
    ret = lib.vaccel_session_init(self._inner, flags)
    if ret != 0:
        raise VaccelError(ret, "Could not initialize session")

has_resource 🔗

has_resource(resource)

Returns true if the resource is registered with the session

Source code in vaccel/session.py
def has_resource(self, resource):
    """Returns true if the resource is registered with the session"""

    return lib.vaccel_session_has_resource(self._inner, resource._get_inner_resource()) != 0

id 🔗

id()

Get the session id

Source code in vaccel/session.py
def id(self):
    """Get the session id"""

    return self._inner.id