You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
542 B

  1. #include "client.hpp"
  2. #include <iostream>
  3. void test(betacore::SHAPE &s){
  4. std::cout << "It worked\n" << std::endl;
  5. }
  6. int main(int argc, char * argv[]){
  7. std::function<void(betacore::SHAPE &S)> fn= test;
  8. betacore::Client client(betacore::ALICE,4444, "localhost",fn);
  9. client.send(false, betacore::TRIANGLE);
  10. client.send(true, betacore::TRIANGLE);
  11. //s.off();
  12. //while(client.running()){}
  13. std::string a;
  14. while(client.running()){
  15. std::cin >> a;
  16. client.send(false, betacore::TRIANGLE);
  17. if (a == "q") client.kill();
  18. }
  19. return 0;
  20. }