FACT++  1.0
bigServer.cxx
Go to the documentation of this file.
1 #include <dis.hxx>
2 #ifdef WIN32
3 #include <process.h>
4 #endif
5 
6 int main(int argc, char *argv[])
7 {
8  int i, msgSize, nServices, pid;
9  char *msg, servName[64];
10  DimService **services;
11 
12  sscanf(argv[1],"%d",&msgSize);
13  sscanf(argv[2],"%d",&nServices);
14  msg = new char[msgSize];
15  strcpy(msg,"hello");
16  services = new DimService*[nServices];
17 
18  pid = getpid();
19  for(i = 0; i < nServices; i++)
20  {
21  // sprintf(servName,"BENCH_SERVICE_%d_%03d",pid, i);
22  sprintf(servName,"BENCH_SERVICE_%03d",i);
23  services[i] = new DimService(servName, "C", msg, msgSize);
24  }
25  sprintf(servName,"BENCH_%d",pid);
26  DimServer::start(servName);
27  while(1)
28  {
29  for(i = 0; i < nServices; i++)
30  {
31  services[i]->updateService();
32  }
33  }
34  return 0;
35 }
int i
Definition: db_dim_client.c:21
int main(int argc, char *argv[])
Definition: bigServer.cxx:6
int updateService()
Definition: discpp.cxx:1016
static void start()
Definition: discpp.cxx:512
sprintf(name1,"NewService%d", i)