Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add kademlia example
[simgrid.git] / examples / bittorrent / Bittorrent.java
1 package bittorrent;
2
3 import org.simgrid.msg.Msg;
4 import org.simgrid.msg.MsgException;
5
6 public class Bittorrent {
7         public static void main(String[] args) throws MsgException {
8                 /* initialize the MSG simulation. Must be done before anything else (even logging). */
9                 Msg.init(args);
10         if(args.length < 2) {
11                 Msg.info("Usage   : Bittorrent platform_file deployment_file");
12                 Msg.info("example : Bittorrent platform.xml deployment.xml");
13                 System.exit(1);
14         }
15                 
16                 /* construct the platform and deploy the application */
17                 Msg.createEnvironment(args[0]);
18                 Msg.deployApplication(args[1]);
19                         
20                 /*  execute the simulation. */
21         Msg.run();              
22         }
23
24 }