MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / start

Method start

libapp2sys/src/main/cpp/client.h:279–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 }
278
279 int start(const char *remote, const char *local, IHardCoderDataCallback *callback) {
280 if (isRunning()) {
281 return 0;
282 }
283
284 respHeaderOffset = 0;
285 respPayload = NULL;
286 respPayloadOffset = 0;
287 m_localpath = local;
288 m_remotepath = remote;
289 m_DataCallback = callback;
290
291 uninit(1);
292 int ret = createSocket(m_localpath.c_str(), m_remotepath.c_str());
293 if (ret > 0) {
294 __sync_fetch_and_add(&m_runningFlag, 1);
295 pthread_t tid;
296 pthread_create(&tid, NULL, localsocketClientThread, this);
297 }
298 return ret;
299 }
300
301 int64_t sendReq(int funcid, uint8_t *data, int dataLen, int tid, int64_t timestamp) {
302 if (!isRunning()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected