Logo AND Algorithmique Numérique Distribuée

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