Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sonar issues.
[simgrid.git] / examples / cpp / app-bittorrent / s4u-bittorrent.cpp
1 /* Copyright (c) 2012-2022. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "s4u-bittorrent.hpp"
7 #include "s4u-peer.hpp"
8 #include "s4u-tracker.hpp"
9
10 int main(int argc, char* argv[])
11 {
12   simgrid::s4u::Engine e(&argc, argv);
13
14   /* Check the arguments */
15   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file", argv[0]);
16
17   e.load_platform(argv[1]);
18
19   e.register_actor<Tracker>("tracker");
20   e.register_actor<Peer>("peer");
21   e.load_deployment(argv[2]);
22
23   e.run();
24
25   return 0;
26 }