Symulacja NAT na przedmiot Symulacje Komputerowe
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.

31 lines
501 B

  1. /*
  2. * P2PServer.h
  3. *
  4. * Created on: 17.01.2017
  5. * Author: Piotr Dergun
  6. */
  7. #ifndef P2PSERVER_H_
  8. #define P2PSERVER_H_
  9. #include "common.h"
  10. #include "Node.h"
  11. #include "Simulation.h"
  12. class P2PServer : public Node
  13. {
  14. string seedIp, peerIp;
  15. int seedPort, peerPort;
  16. Simulation *sim;
  17. public:
  18. P2PServer();
  19. P2PServer(string hostname, string ip, string mask);
  20. virtual ~P2PServer();
  21. virtual void onRecv();
  22. const Simulation* getSim();
  23. void setSim(Simulation* sim);
  24. };
  25. #endif /* P2PSERVER_H_ */