CRM64Pro GDK v0.80.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
Tutorial 15: Network

Overview

This command-line tutorial creates a small TCP chat. One process starts the threaded server and joins it as a local administrative client; other processes connect as named remote clients.

A small input thread keeps console reading separate from the main receive loop. The main thread drains queued network messages, handles control events and releases every returned payload through NetTCP::freeData().

Note
This console tutorial is a narrow threading example. The input thread uses only the documented thread-safe NetTCP operations and logging; it does not access graphics, Scene state or general GDK objects. See Threading conventions for the default main-thread rule.

Final result

CRM64Pro Tutorial 15 network chat

Run examples

  • Server: Tutorial_15_Network -s
  • Client one: Tutorial_15_Network -c localhost Alice
  • Client two: Tutorial_15_Network -c localhost Bob

Chat commands