#include #include "tinypb_coder.hpp" #include "tinypb_data.hpp" using namespace std; using namespace tinyrpc; int main() { TinypbData data; data.msg_req = "11231231312"; data.pb_data = "121231233456"; data.service_full_name = "aaa.b12313bb"; TinypbCoder coder; TcpBuffer buffer; TinypbData newdata; coder.encoder(buffer, data); coder.decoder(buffer, newdata); cout << newdata.msg_req << endl; cout << newdata.pb_data << endl; cout << newdata.service_full_name << endl; return 0; }