Receive and send messages
This commit is contained in:
21
base.h
Normal file
21
base.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef YC_LIB_BASE_H
|
||||
#define YC_LIB_BASE_H
|
||||
|
||||
#include <json/json.h>
|
||||
|
||||
namespace Yc {
|
||||
namespace Lib {
|
||||
|
||||
class Base {
|
||||
protected:
|
||||
std::string getJsonString(Json::Value json);
|
||||
void send(int socket, std::string out);
|
||||
void send(int socket, Json::Value out);
|
||||
std::string readSocket(int socket);
|
||||
Json::Value getJsonTree(std::string msg);
|
||||
};
|
||||
|
||||
} // namespace Lib
|
||||
} // namespace Yc
|
||||
|
||||
#endif // YC_LIB_BASE_H
|
||||
Reference in New Issue
Block a user