From d25614d50f831397f6a0ed0c14d87688c43b278c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 6 Mar 2020 22:10:24 +0100 Subject: [PATCH] Allow address/port retrieval from View. --- server/TracyView.hpp | 3 +++ server/TracyWorker.hpp | 1 + 2 files changed, 4 insertions(+) diff --git a/server/TracyView.hpp b/server/TracyView.hpp index ece46f62..ad68a744 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -81,6 +81,9 @@ public: void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void SetTextEditorFile( const char* fileName, int line ); + std::string GetAddress() const { return m_worker.GetAddr(); } + int GetPort() const { return m_worker.GetPort(); } + private: enum class Namespace : uint8_t { diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 1160ccaa..f15ccb82 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -337,6 +337,7 @@ public: ~Worker(); const std::string& GetAddr() const { return m_addr; } + int GetPort() const { return m_port; } const std::string& GetCaptureName() const { return m_captureName; } const std::string& GetCaptureProgram() const { return m_captureProgram; } uint64_t GetCaptureTime() const { return m_captureTime; }