SmartFoxServer 3 C++ Client API 3.1.1-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::event::ExtensionResponse Struct Reference

Dispatched when data from a server-side Extension is received. More...

#include <SFSEvent.h>

Public Attributes

std::string cmd
 The name of the custom command to process.
std::shared_ptr< entities::SFSObject > params
 The data sent by the Extension.
net::TransportType txType
 The transport used by the Extension: TCP, UDP reliable or UDP unreliable.
std::optional< int32_t > roomId
 (optional) The roomId if the response was sent from a Room Extension
std::shared_ptr< entities::Room > room
 (optional) The relative Room object, if the response was sent from a Room Extension.

Detailed Description

Dispatched when data from a server-side Extension is received.

The server usually sends this data to one or more clients in response to a requests::ExtensionRequest.

See also
requests::ExtensionRequest

Member Data Documentation

◆ cmd

std::string sfs3::event::ExtensionResponse::cmd

The name of the custom command to process.

When the Extension replies to a request from this client, it is common practice to reuse the command name of that request.

◆ room

std::shared_ptr<entities::Room> sfs3::event::ExtensionResponse::room

(optional) The relative Room object, if the response was sent from a Room Extension.

It can be null even when roomId is set, if the Room is not known to this client (rare use case)


The documentation for this struct was generated from the following file: