Older/UnitTest/WebRTCClient/Client.h
amass 94c246aa7b
All checks were successful
Deploy / Build (push) Successful in 6m19s
add ftxui.
2025-01-13 23:56:55 +08:00

28 lines
552 B
C++

#ifndef __CLIENT_H__
#define __CLIENT_H__
#include <sstream>
#include <string>
class ClientPrivate;
class Client {
friend class ClientPrivate;
public:
Client();
~Client();
std::string id() const;
static std::string randomId(size_t length);
void log(const std::string &message);
std::string log() const;
bool setRemoteId(const std::string &id);
bool sendMessage(const std::string &message);
private:
ClientPrivate *m_d = nullptr;
std::string m_id;
std::ostringstream m_oss;
};
#endif // __CLIENT_H__