UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
FJsonHubProtocol Class Reference

Implementation of the SignalR JSON hub protocol. More...

#include <JsonHubProtocol.h>

Inheritance diagram for FJsonHubProtocol:
IHubProtocol

Public Member Functions

virtual ~FJsonHubProtocol () override=default
 Virtual destructor for the JSON hub protocol.
 
virtual FName Name () const override
 Gets the name of this hub protocol.
 
virtual int Version () const override
 Gets the version of this hub protocol.
 
virtual FString SerializeMessage (const FHubMessage *InMessage) const override
 Serializes a hub message to a JSON string.
 
virtual TArray< TSharedPtr< FHubMessage > > ParseMessages (const FString &InMessage) const override
 Parses a string containing one or more JSON messages into hub message objects.
 
- Public Member Functions inherited from IHubProtocol
virtual ~IHubProtocol ()
 

Static Public Attributes

static constexpr TCHAR RecordSeparator = TEXT('\x1e')
 Character used to separate records in the SignalR protocol stream.
 

Detailed Description

Implementation of the SignalR JSON hub protocol.

Handles serialization and deserialization of SignalR messages in JSON format.

Constructor & Destructor Documentation

◆ ~FJsonHubProtocol()

virtual FJsonHubProtocol::~FJsonHubProtocol ( )
overridevirtualdefault

Virtual destructor for the JSON hub protocol.

Member Function Documentation

◆ Name()

FName FJsonHubProtocol::Name ( ) const
overridevirtual

Gets the name of this hub protocol.

Returns
The name of the protocol.

Implements IHubProtocol.

◆ ParseMessages()

TArray< TSharedPtr< FHubMessage > > FJsonHubProtocol::ParseMessages ( const FString & InMessage) const
overridevirtual

Parses a string containing one or more JSON messages into hub message objects.

Parameters
InMessageThe string to parse.
Returns
Array of parsed hub messages.

Implements IHubProtocol.

◆ SerializeMessage()

FString FJsonHubProtocol::SerializeMessage ( const FHubMessage * InMessage) const
overridevirtual

Serializes a hub message to a JSON string.

Parameters
InMessageThe message to serialize.
Returns
The serialized message string.

Implements IHubProtocol.

◆ Version()

int FJsonHubProtocol::Version ( ) const
overridevirtual

Gets the version of this hub protocol.

Returns
The protocol version.

Implements IHubProtocol.

Member Data Documentation

◆ RecordSeparator

TCHAR FJsonHubProtocol::RecordSeparator = TEXT('\x1e')
staticconstexpr

Character used to separate records in the SignalR protocol stream.


The documentation for this class was generated from the following files: