Last change
on this file since 18481 was 11071, checked in by tbretz, 13 years ago |
Replaced v19r21 by a version extracted with 'unzip -a' to get proper unix text format.
|
File size:
728 bytes
|
Line | |
---|
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 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.