MCPcopy Create free account
hub / github.com/breach/thrust / ThreadRun

Method ThreadRun

src/api/api_server.cc:398–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398void
399APIServer::ThreadRun()
400{
401 char chunk[5000];
402 std::cin.getline(chunk, 5000);
403
404 /*
405 LOG(INFO) << "GOOD: " << std::cin.good();
406 LOG(INFO) << "EOF : " << std::cin.eof();
407 LOG(INFO) << "FAIL: " << std::cin.fail();
408 LOG(INFO) << "BAD : " << std::cin.bad();
409 */
410
411 /*
412 LOG(INFO) << "READ: " << std::string(chunk, strlen(chunk));
413 */
414
415 client_->ProcessChunk(std::string(chunk, strlen(chunk)));
416 if(std::cin.fail()) {
417 std::cin.clear();
418 }
419
420 /* Finally we loop */
421 thread_->message_loop()->PostTask(
422 FROM_HERE,
423 base::Bind(&APIServer::ThreadRun, this));
424}
425
426void
427APIServer::ThreadTearDown()

Callers

nothing calls this directly

Calls 1

ProcessChunkMethod · 0.80

Tested by

no test coverage detected