Exemplo n.º 1
0
void Client::EnterMainLoop()
{
	init();
	std::string in;
	while (true)
	{
		std::getline(std::cin, in);
		addSend(in);
	}
}
Exemplo n.º 2
0
  //-----------------------------------------------------------------------
  void BsmpManager::bspSend(int pid,const void *tag, const void * payload,int payload_bytes){

    assert(0 <= pid < baseProcess_->getTotalNumProcs());

    BspSend bspSend;
    bspSend.nBytes(payload_bytes).superstep(baseProcess_->superstep()).tagSize(currentTagSize_.value());
    bspSend.writeInMem(payload);
    bspSend.writeTag(tag);
    //cerr << "BsmpManager::bspSend->sending message to task: " << pid << endl;
    //bspSend.dump(true);
    if (pid != baseProcess_->getMyPid())
      stubPool_->bspSend(pid, bspSend);
    else
     addSend(bspSend);

  }