Transport Layer

GONet uses a pluggable transport abstraction that separates networking logic from the underlying protocol. The default transport is NetcodeIO, providing UDP with encryption and token-based authentication out of the box.

IGONetTransport Abstraction

All transports in GONet implement the IGONetTransport interface. This allows GONet's core networking to work identically regardless of which transport is active. You can switch transports by changing a single configuration in GONetGlobal.

The transport is responsible for connection management, packet sending/receiving, and disconnect detection. Everything above the transport layer -- serialization, channels, reliability, events -- is transport-agnostic.

NetcodeIO Transport

NetcodeIO is GONet's default and production-ready transport. It is built on top of raw UDP and adds encryption and token-based authentication.

  • UDP-based -- Low-latency unreliable datagrams for game state updates. No TCP head-of-line blocking.
  • Encryption -- All packets are encrypted using the NetcodeIO protocol, preventing packet sniffing and tampering.
  • Token-based authentication -- Clients must present a valid connect token to join a server. Tokens are time-limited and cryptographically signed.
  • Dual-stack -- Supports both IPv4 and IPv6 connections.

ReliableNetcode Layer

On top of NetcodeIO, GONet adds the ReliableNetcode reliability layer. This provides reliable ordered delivery for messages that require it (RPCs, events, spawn commands) while keeping unreliable delivery available for state updates where the latest value is all that matters.

ReliableNetcode uses a 7-phase processing pipeline:

  1. 1.Packet fragmentation and reassembly
  2. 2.Sequence numbering
  3. 3.Acknowledgment tracking
  4. 4.Retransmission on loss
  5. 5.Ordering guarantees
  6. 6.Duplicate detection
  7. 7.Congestion feedback

12-Channel System

GONet routes all messages through 12 prioritized channels. System-critical traffic (time sync, initialization, heartbeats) runs on high-priority channels that are never blocked by gameplay data.

Channel TypeDeliveryPurpose
System (high priority)ReliableTime sync, initialization, heartbeat
EventsReliablePersistent and transient events
RPCsReliableRemote procedure calls
State (value sync)UnreliableAuto-sync values, transforms
State (velocity sync)UnreliableVelocity-augmented sync packets

The channel separation ensures that a burst of state updates cannot delay a critical RPC or time sync packet.

Steamworks P2P TransportGONet Legendary

A Steamworks-based transport is included in GONet Legendary (v1.6+). It will provide peer-to-peer networking via Steam Datagram Relay (SDR), which handles NAT traversal automatically using Valve's relay network.

  • P2P via Steam relay -- No need for dedicated servers or NAT punchthrough configuration.
  • Same IGONetTransport interface -- Swap in the Steamworks transport with a single configuration change.

Next Steps

Transport Layer | GONet Docs