netchan

Multiplexed reliable and unreliable channels over an unreliable datagram transport, in portable C11

This documentation describes version 0.9.2.

  • Introduction

    What netchan is, what it carries, and the limits it accepts on purpose.

  • Architecture

    The seam that lets one object file run over UDP, a WebSocket, or an encrypted tunnel.

  • Protocol overview

    Datagrams, frames, channels, and how a session is established.

  • Tutorial: UDP peer to peer

    A working peer in one file: open a socket, feed netchan, drain what it wants to send.

  • Tutorial: client and server

    One connection object per peer, demultiplexed by connection id.

  • Tutorial: authentication

    Adding the encrypted transport and an ssh-shaped login to a working session.

  • Tutorial: extending the protocol

    Adding your own frame types without breaking a peer that predates them.

  • Message encoding

    The IDL, the tagged wire format, and how a reader skips a field it has never heard of.

  • Protocol reference

    Frame layouts, header bits, and the constants that bound the implementation.

  • Testing and analysis

    Five layers of checking, from unit tests to a fuzzer, and what each one has actually found.

  • API reference

    Every function netchan.h declares, generated from the header so it cannot drift from the code.

  • Registration and interactive authentication

    How a client with no account asks a public server for one, and the single interactive method that carries registration, passwords, and tokens alike.

  • Finding servers

    A beacon packet for the local network, and why anything a meta-server should trust goes over HTTPS instead.

netchan 0.9.2 RSS