51 [[nodiscard]]
const std::string&
HostName()
const {
return host_name_; }
58 [[nodiscard]] uint16_t
Port()
const {
return port_; }
65 void Name(
const std::string& name) { name_ = name; }
72 [[nodiscard]] std::string
Name()
const {
return name_; }
80 description_ = description;
88 [[nodiscard]]
const std::string&
Description()
const {
return description_; }
119 std::unique_ptr<detail::ListenMessage>& message) = 0;
134 std::string host_name_ =
"127.0.0.1";
137 std::string description_;
bool Active() const
Returns if the interface is activated or deactivated.
Definition ilistenclient.h:103
uint16_t Port() const
Return the TCP/IP port.
Definition ilistenclient.h:58
const std::string & HostName() const
Returns the host name.
Definition ilistenclient.h:51
virtual ~IListenClient()=default
Default destructor.
bool IsConnected() const
Returns true if the client is connected to a server.
Definition ilistenclient.h:110
std::string Name() const
Name of the client.
Definition ilistenclient.h:72
void Name(const std::string &name)
Sets a name for the client.
Definition ilistenclient.h:65
void Description(const std::string &description)
Description of the client.
Definition ilistenclient.h:79
std::atomic< bool > connected_
True if connected.
Definition ilistenclient.h:131
std::atomic< bool > active_
Indicate if the message should be used or not.
Definition ilistenclient.h:129
IListenClient(const std::string &host_name, uint16_t port)
Constructor.
virtual void SendLogLevel(uint64_t level)=0
Send log level to the server.
const std::string & Description() const
Returns the cleint description.
Definition ilistenclient.h:88
void Active(bool active)
Active or deactivates the client.
Definition ilistenclient.h:95
virtual bool GetMsg(std::unique_ptr< detail::ListenMessage > &message)=0
Returns the next listen message.
The log namespace is used for log related classes and functions.
Definition idirectory.h:18
Implements a thread-safe queue.