ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
subscribe_request Struct Referencefinal

Request to subscribe to entity change notifications. More...

#include <subscription_protocol.hpp>

Collaboration diagram for subscribe_request:
Collaboration graph

Public Member Functions

std::vector< std::byte > serialize () const
 Serialize request to bytes.
 

Static Public Member Functions

static std::expected< subscribe_request, error_code > deserialize (std::span< const std::byte > data)
 Deserialize request from bytes.
 

Public Attributes

std::string event_type
 The event type to subscribe to.
 

Detailed Description

Request to subscribe to entity change notifications.

The client sends this to register interest in receiving notifications when a particular entity type changes.

Member Function Documentation

◆ serialize()

std::vector< std::byte > serialize ( ) const

Serialize request to bytes.

Format:

  • 2 bytes: event_type length
  • N bytes: event_type (UTF-8)
Here is the caller graph for this function:

Member Data Documentation

◆ event_type

std::string event_type

The event type to subscribe to.

Uses the logical event name from event_traits (e.g., "ores.risk.currency_changed").