Exemplo n.º 1
0
void main()
{
  MessageQueue outQ;
  TextSearch ts(outQ);

  ft.EnQ(new TextSearch::SearchString("hello"));
  Message *rsp = outQ.deQ();

  std::cout << "Success = " << rsp->Headers()["Success"] << std::endl;

  ft.EnQ(new TextSearch::SearchString("hello", 3));
  rsp = outQ.deQ();

  std::cout << "Success = " << rsp->Headers()["Success"] << std::endl;
}
Exemplo n.º 2
0
void main()
{
  MessageQueue outQ;
  FileTransfer ft(outQ);
  
  ft.EnQ(new FileTransfer::PutFile("C:\\tmp\\a.txt"));
  Message *rsp = outQ.deQ();

  std::cout << "Success = " << rsp->Headers()["Success"] << std::endl;
}
Exemplo n.º 3
0
void main()
{
    MessageQueue mq;
    TCPListener l(50000, mq);

    Message *m = mq.deQ();
    std::cout << m->Cmd() << std::endl;

    l.Shutdown();
    l.Wait();
}