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
  • How It Works
  • NAT Types
  • Fallback to Server Relay-Hybrid Connectivity Architecture in Diarkis P2P

Was this helpful?

  1. Diarkis Modules

P2P Module

Diarkis P2P enables direct client-to-client communication using NAT traversal and UDP hole punching, with server-relay fallback for seamless, low-latency data exchange.

PreviousSet Up Field Module on ServerNextSet Up P2P Module on Server

Last updated 1 month ago

Was this helpful?

Overview

Diarkis P2P enables direct communication between user devices without using a server as an intermediary.

The Diarkis server cluster functions as a client discovery point by utilizing NAT traversal technology.

In peer-to-peer communication, the server does not intervene for each packet exchange, allowing client devices to minimize network latency.

Diarkis P2P supports only the UDP network protocol and features a proprietary implementation of RUDP (Reliable UDP) to ensure packet delivery and order.

All packets exchanged between connected devices are encrypted, with encryption keys unique to the connection between the connected devices, ensuring secure communication.

How It Works

Peer-to-peer communication requires two steps. First, clients exchange their addresses and perform . Once hole punching is successful, clients can send and receive packets directly.

NAT Types

In Diarkis P2P, the client SDK includes a hole punching feature, also known as NAT traversal. While NAT traversal is a common technology used in game console systems and many other networked applications, a key feature of Diarkis P2P is its ability to establish connectivity even with devices connected to Symmetric Cone-type routers, which typically cannot be reached using standard hole punching methods—though it is not guaranteed, Diarkis P2P increases the chances of successful communication.

NAT Type
Other Solutions
Diarkis

Full

○

○

Restricted

○

○

Port Restricted

○

○

Symmetric

✖︎

△

Fallback to Server Relay-Hybrid Connectivity Architecture in Diarkis P2P

Diarkis P2P is designed with a hybrid communication architecture that enables client devices to maintain a persistent connection to the Diarkis server cluster while simultaneously attempting to establish direct peer-to-peer (P2P) communication.

If a P2P connection cannot be established—due to NAT restrictions, firewall policies, or symmetric NAT configurations—Diarkis automatically triggers a fallback to server-relay mode, utilizing its built-in TURN-like functionality. This ensures uninterrupted, bidirectional packet delivery between clients, regardless of network topology.

By preserving both server and peer connectivity, Diarkis P2P guarantees resilient communication continuity, supports dynamic fallback routing, and maintains session integrity across varied client environments without manual intervention or custom NAT traversal logic.

hole punching