LogoLogo
English
English
  • Diarkis Help Center
  • Overview of Diarkis
  • Getting Started
    • Diarkis Server Template
    • Diarkis Client SDK
    • Tutorials
      • 1. Launch Diarkis Server in Local Environment
      • 2. Perform Connectivity Check with Test Client
      • 3. Implement Custom Command
      • Connect to Server from Diarkis Client
    • Samples
  • Diarkis Modules
    • Room Module
      • Set Up Room Module on Server
      • Room Sample
        • room_broadcast
      • Utilizing Room Module from Client
      • Additional Features of Room
    • MatchMaker Module
      • Set Up MatchMaker Module on Server
    • Field Module
      • Set Up Field Module on Server
    • P2P Module
      • Set Up P2P Module on Server
      • P2P Sample
    • DM (Direct Message) Module
      • Set Up DM Module on Server
    • Notifier Module
      • Set Up Notifier Module on Server
    • Session Module
      • Set Up Session Module on Server
    • Group Module
      • Set Up Group Module on Server
  • Diarkis Server
    • Launch Diarkis Server in Cloud Environment
      • AWS
    • Launch Diarkis Server on Windows Environment
    • MARS Server
    • UDP Server
    • TCP Server
    • HTTP Server
    • Metrics API
    • Inter-server Communication - Mesh
  • Diarkis Client
    • Runtime Library
      • Diarkis RUDP
    • Diarkis Module
      • Initialization and Termination of Diarkis Module
      • Customization of Diarkis Module
      • Logging System of Diarkis Module
      • Migration
      • Threads of Diarkis
    • Samples
      • C++
        • room_broadcast
        • directmessage_simple
        • group_sample
        • matching_and_turn
        • matchmaker_ticket
        • p2p_rudp_sample
        • session_simple
      • Unreal Engine Plugin
        • FieldWalker
      • Unity Plugin
        • FieldWalker
          • HowToReplicatePosition.md
  • Diarkis Tools
    • Diarkis CLI
      • Procedures to Switch to Diarkis CLI v3
  • References
    • API Reference
    • Release Notes
      • v1.0
      • v1.0.1
      • v1.0.2
      • v1.0.3
      • v1.0.4
      • v1.0.5
      • v1.0.6
  • Support
    • License and Billing
Powered by GitBook
On this page
  • Overview
  • Session Invitations
  • Accepting Invitations

Was this helpful?

  1. Diarkis Modules

Session Module

Diarkis Session is a lightweight, stateful communication module that enables controlled, real-time message exchange and shared property management among a defined group of users.

PreviousSet Up Notifier Module on ServerNextSet Up Session Module on Server

Last updated 28 days ago

Was this helpful?

Overview

The Diarkis Session module provides a lightweight, scoped communication context that supports integration with other Diarkis modules, including Room, Group, Field, and DM. It is designed for temporary, stateful interactions among a defined set of users, offering controlled membership, event handling, and data sharing.

Core Capabilities:

  • Session Membership Management: A Session supports a maximum number of concurrent members, defined at the time of creation. Users can be invited dynamically, but if the session’s capacity is full at the time of acceptance, the invitee will be denied entry. This allows for precise control over participant limits and session behavior.

  • Event Triggers: The Session module automatically emits join, leave, and delete events, allowing applications to respond to user state changes and session lifecycle transitions in real time.

  • Broadcast Messaging: Within an active session, all members can exchange broadcast messages, enabling real-time group coordination without requiring Room-based message routing.

  • Property Persistence (in-memory only): Sessions support shared property storage, allowing the system to store and retrieve structured session-level metadata (e.g., settings, context, or shared game state) for the duration of the session’s lifespan.

Modular Compatibility:

Sessions can operate in conjunction with other Diarkis modules, acting as a lightweight control layer or membership gateway. For example:

  • Use with Room for scoped messaging and object synchronization.

  • Use with DM for member-specific private messaging.

  • Use with Field to track entity presence across servers.

For implementation specifics, configuration parameters, and method references, please consult the .

Session Invitations

In the Diarkis Session module, the session owner (creator) holds the authority to invite users into the session by specifying their unique user ID. This invitation mechanism is designed for controlled, authenticated entry into temporary, scoped communication environments.

Invitation Process:

  • User-Specific Invitations: Invitations are issued on a per-user basis and are associated with the target user's ID, ensuring that only the intended recipient can respond.

  • TTL Enforcement (Time-To-Live): Each invitation includes a TTL (Time To Live) parameter, defined in seconds. This TTL dictates the validity window for the invitation. If the TTL expires before the invited user accepts, the system no longer guarantees successful entry—even if the user attempts to join.

  • Join Operation: Upon receiving an invitation, the recipient can invoke the Join API to request admission. The server evaluates the session's current member count and the invitation's TTL status before admitting the user.

This design supports secure, time-bound session access while maintaining control over maximum membership limits and session integrity. For implementation guidance and TTL configuration options, refer to the Diarkis Server API documentation.

Accepting Invitations

Users who receive a Session invitation may join the associated Session by explicitly accepting the invitation and invoking the Join() API call. This operation validates the invitation parameters—including its target user ID, session identifier, and TTL (Time-To-Live)—before granting access.

Once validated, the user is added to the Session's active member list, provided the maximum member capacity has not been exceeded. This controlled entry mechanism ensures secure, session-scoped participation and maintains integrity across distributed session states.

Refer to the Diarkis Server API documentation for method signatures and required parameters.

Diarkis Server API documentation