|
|
static xiiResult | ConnectToServer (xiiStringView sConnectTo={}) |
| Starts a connection as a 'Client' to one server.
|
|
static void | CreateServer () |
| Opens a connection as a server.
|
|
static void | CloseConnection () |
| Closes any connection previously opened using ConnectToServer() or CreateServer().
|
|
|
static void | Broadcast (TransmitMode tm, xiiUInt32 uiSystemID, xiiUInt32 uiMsgID, const void *pData, xiiUInt32 uiDataBytes) |
|
static void | Broadcast (TransmitMode tm, xiiUInt32 uiSystemID, xiiUInt32 uiMsgID, xiiStreamReader &ref_stream, xiiInt32 iDataBytes=-1) |
|
static void | Broadcast (TransmitMode tm, xiiTelemetryMessage &ref_msg) |
|
static void | SendToServer (xiiUInt32 uiSystemID, xiiUInt32 uiMsgID, const void *pData=nullptr, xiiUInt32 uiDataBytes=0) |
|
static void | SendToServer (xiiUInt32 uiSystemID, xiiUInt32 uiMsgID, xiiStreamReader &ref_stream, xiiInt32 iDataBytes=-1) |
|
static void | SendToServer (xiiTelemetryMessage &ref_msg) |
|
|
static ConnectionMode | GetConnectionMode () |
| Returns whether the telemetry system is set up as Server, Client or not initialized at all.
|
|
static bool | IsConnectedToServer () |
| Returns whether a Client has an active connection to a Server.
|
|
static bool | IsConnectedToClient () |
| Returns whether a Server has an active connection to at least one Client.
|
|
static bool | IsConnectedToOther () |
| Returns whether a connection to another application has been made. Does not differentiate between Server and Client mode.
|
|
static xiiTime | GetPingToServer () |
| Returns the last round trip time ('Ping') to the Server. Only meaningful if there is an active connection (see IsConnectedToServer() ).
|
|
static xiiStringView | GetServerName () |
| Returns the name of the machine on which the Server is running. Only meaningful if there is an active connection (see IsConnectedToServer() ).
|
|
static void | SetServerName (xiiStringView sName) |
| Sets the name of the telemetry server. This is broadcast to connected clients, which can display this string for usability.
|
|
static xiiStringView | GetServerIP () |
| Returns the IP address of the machine on which the Server is running. Only meaningful if there is an active connection (see IsConnectedToServer() ).
|
|
static xiiUInt32 | GetServerID () |
| Returns a 'unique' ID for the application instance to which this Client is connected.
|
|
static xiiMutex & | GetTelemetryMutex () |
| Returns the internal mutex used to synchronize all telemetry data access.
|
|
|
using | ProcessMessagesCallback = void (*)(void*) |
|
static xiiResult | RetrieveMessage (xiiUInt32 uiSystemID, xiiTelemetryMessage &out_message) |
| Checks whether any message for the system with the given ID exists and returns that.
|
|
static void | UpdateNetwork () |
| Polls the network for new incoming messages and ensures outgoing messages are sent.
|
|
static void | AcceptMessagesForSystem (xiiUInt32 uiSystemID, bool bAccept, ProcessMessagesCallback callback=nullptr, void *pPassThrough=nullptr) |
|
static void | PerFrameUpdate () |
| Call this once per frame to process queued messages and to send the PerFrameUpdate event.
|
|
static void | SetOutgoingQueueSize (xiiUInt32 uiSystemID, xiiUInt16 uiMaxQueued) |
| Specifies how many reliable messages from a system might get queued when no recipient is available yet.
|
|
Checks whether any message for the system with the given ID exists and returns that.
If no message for the given system is available, XII_FAILURE is returned. This function will not poll the network to check whether new messages arrived. Use UpdateNetwork() and RetrieveMessage() in a loop, if you are waiting for a specific message, to continuously update the network state and check whether the desired message has arrived. However, if you do so, you will be able to deadlock your application, if such a message never arrives. Also it might fill up other message queues which might lead to messages getting discarded.
Sets the name of the telemetry server. This is broadcast to connected clients, which can display this string for usability.
Usually this would be used to send the application name, to make it easier to see to which app the tool is connected, but setting a custom name can be used to add important details, e.g. whether the app is running in single-player or multi-player mode etc. The server name can be changed at any time.