MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / tcp_recv

Method tcp_recv

Extensions/PilotOSMachine/QPilotOSMachine.cpp:251–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251bool QPilotOSMachine::tcp_recv(const std::string& ip, const unsigned short& port, const string& task_id, std::string& resp)
252{
253 TCPClient tcp_client;
254
255 tcp_client.init(ip.c_str(), port + 1, task_id);
256 tcp_client.send_data(task_id, TCPMsg::TcpMsgType::TASK_ID_MSG);
257 tcp_client.run_heart_thread();
258
259 const bool b_recv_result_ok = tcp_client.wait_recv_task_result(resp, task_id);
260 tcp_client.stop_heart_thread();
261 return b_recv_result_ok;
262}
263
264PilotQVM::ErrorCode QPilotOSMachine::parser_probability_result(const std::string& json_msg, std::vector<std::map<std::string, double>>& result)
265{

Callers 2

export_extension_classFunction · 0.80
_tcp_recvMethod · 0.80

Calls 5

send_dataMethod · 0.80
run_heart_threadMethod · 0.80
wait_recv_task_resultMethod · 0.80
stop_heart_threadMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected