Skip to content

Message Framing

Joshua Scott edited this page Oct 2, 2018 · 6 revisions

KingsIsle Networking Protocol (KINP) uses a hybrid delimited/length-prefixed approach to message framing. Each message is prefixed with a 2-byte sequence, "0xF00D", in little-endian byte order. We've decided to name this the "Start Signal", as it indicates the beginning of a message, however, it can also be referred to as the "Food Header". After receiving the start signal, the length of the incoming message is sent as an unsigned 2-byte integer in little-endian byte order, followed by the message payload.

Structure

Name Type Description
startSignal uint16_t Always 0xF00D. Indicates the start of a message.
length uint16_t The length of the message payload.
payload uint8_t[length] The message payload.

Note: This same structure is used regardless of the underlying transport protocol (TCP/UDP).

  1. Introduction
  2. Data Markup Language (DML)
    1. What is DML?
    2. DML Syntax
    3. DML Data Types
    4. DML Examples
  3. Property Class System
    1. Work in Progress
  4. KingsIsle Networking Protocol (KINP)
    1. Sessions
    2. Message Framing
    3. Message Structure
    4. Control Messages
      1. Session Offer
      2. Session Accept
      3. Keep Alive
    5. DML Messages
      1. Message Modules
      2. Binary Structure

Clone this wiki locally