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
  • How to Build and Run C++ Samples
  • General Samples
  • Building Samples for iOS Simulator
  • Running Android Samples

Was this helpful?

  1. Diarkis Client
  2. Samples

C++

How to Build and Run C++ Samples

General Samples

  1. Under the samples directory, there is a folder structure "SampleName\PlatformName", which contains the sample files. Open the .sln file in each folder using Visual Studio.

  2. Specify the command arguments in Project > Properties > Debug > Command Arguments.

     $(endPoint) $(uid) $(clientKey) e.g. 192.168.XXX.XXX:7000 2222 5599933
  3. Build and run using F5. The execution status will be displayed in the output window.

  4. When executing multiple clients, run multiple clients in separate processes from a terminal, such as the Windows Command Prompt.

    > .\x64\Debug\matchmaker_ticket.exe $(endPoint) $(uid) $(clientKey)
    e.g. matchmaker_ticket.exe 192.168.XXX.XXX:7000 2222 5599933

Building Samples for iOS Simulator

  1. In Xcode, verify Product > Destination > Destination Architectures > Show Rosetta Destinations.

  2. Click the run destination on the top bar and select the Rosetta simulator.

  3. Open Build Settings > Search Paths.

  4. Adjust the order of search paths so that ../../../platforms/ios/iOS-Simulator/lib_static is prioritized.

Running Android Samples

  1. Right-click on the project in Visual Studio and open Properties.

  2. Navigate to Debugging.

  3. Set the launch arguments in Launch Flags. Specify the arguments with the --es option (intent arguments).

  4. e.g.

    --es host 192.168.55.117:7000 --es uid 1111 --es clientKey AAAA
PreviousSamplesNextdirectmessage_simple

Last updated 1 month ago

Was this helpful?