Pages
API Documentation
On this page

Sonic::Ipc Namespace

Framed peer-to-peer messages over local sockets. More...

  • Header: #include <Sonic/Ipc/Frame>
  • CMake: find_package(SonicIpc REQUIRED)
    target_link_libraries(mytarget PRIVATE Sonic::Ipc)

Detailed Description

The Sonic IPC frame. Big-endian header of 20 bytes, then the payload:

Type Field
quint32 magic 0x534F4E43
quint16 frame format 1
quint16 application protocol
quint32 type
quint32 payload length
quint32 CRC-32 of the payload

Namespaces

namespace Ipc::Crc32

Classes

class Client

Connects to a Server.

class Connection

One framed connection over a QLocalSocket.

struct Ipc::Frame

class FrameReader

Splits a byte stream into frames.

class Server

Listens on a local socket.

Variable Documentation

const qint64 Ipc::defaultMaxPayload

The largest payload accepted unless a caller sets another limit: 16 MiB.

const quint16 Ipc::frameFormatVersion

The frame format this library writes and reads.

const qsizetype Ipc::frameHeaderSize

The header's size in bytes.

const quint32 Ipc::frameMagic

The first four bytes of every frame, "SONC".

Function Documentation

QByteArray Ipc::encodeFrame(quint32 type, QByteArrayView payload, quint16 protocolVersion)

The frame bytes for payload of type in application protocol protocolVersion; empty, with a warning, for the reserved Frame::VersionRejected type.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.