|
|
static ezResult | ConnectToServer (ezStringView sConnectTo={}) |
| Starts a connection as a 'Client' to one server. More...
|
|
static void | CreateServer () |
| Opens a connection as a server. More...
|
|
static void | CloseConnection () |
| Closes any connection previously opened using ConnectToServer() or CreateServer(). More...
|
|
|
static void | Broadcast (TransmitMode tm, ezUInt32 uiSystemID, ezUInt32 uiMsgID, const void *pData, ezUInt32 uiDataBytes) |
|
static void | Broadcast (TransmitMode tm, ezUInt32 uiSystemID, ezUInt32 uiMsgID, ezStreamReader &inout_stream, ezInt32 iDataBytes=-1) |
|
static void | Broadcast (TransmitMode tm, ezTelemetryMessage &ref_msg) |
|
static void | SendToServer (ezUInt32 uiSystemID, ezUInt32 uiMsgID, const void *pData=nullptr, ezUInt32 uiDataBytes=0) |
|
static void | SendToServer (ezUInt32 uiSystemID, ezUInt32 uiMsgID, ezStreamReader &inout_stream, ezInt32 iDataBytes=-1) |
|
static void | SendToServer (ezTelemetryMessage &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 ezTime | GetPingToServer () |
| Returns the last round trip time ('Ping') to the Server. Only meaningful if there is an active connection (see IsConnectedToServer() ).
|
|
static ezStringView | 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 (ezStringView sName) |
| Sets the name of the telemetry server. This is broadcast to connected clients, which can display this string for usability. More...
|
|
static ezStringView | 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 ezUInt32 | GetServerID () |
| Returns a 'unique' ID for the application instance to which this Client is connected. More...
|
|
static ezMutex & | GetTelemetryMutex () |
| Returns the internal mutex used to synchronize all telemetry data access. More...
|
|
|
using | ProcessMessagesCallback = void(*)(void *) |
|
static ezResult | RetrieveMessage (ezUInt32 uiSystemID, ezTelemetryMessage &out_message) |
| Checks whether any message for the system with the given ID exists and returns that. More...
|
|
static void | UpdateNetwork () |
| Polls the network for new incoming messages and ensures outgoing messages are sent. More...
|
|
static void | AcceptMessagesForSystem (ezUInt32 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 (ezUInt32 uiSystemID, ezUInt16 uiMaxQueued) |
| Specifies how many reliable messages from a system might get queued when no recipient is available yet. More...
|
|
Checks whether any message for the system with the given ID exists and returns that.
If no message for the given system is available, EZ_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.