source: trunk/FACT++/dim/src/examples/test_client_slac.c@ 16336

Last change on this file since 16336 was 11071, checked in by tbretz, 14 years ago
Replaced v19r21 by a version extracted with 'unzip -a' to get proper unix text format.
File size: 553 bytes
Line 
1#include <dic.h>
2#include <dis.h>
3#include <time.h>
4
5void rout( tag, buf, size )
6char *buf;
7int *tag, *size;
8{
9 printf("%s Received for Server %d\n", buf, *tag);
10}
11
12main()
13{
14 char str[80], aux[80];
15 int i;
16
17 for(i = 0; i< 20; i++)
18 {
19 sprintf(str,"TEST_SLAC/SRV%d",i);
20 dic_info_service( str, TIMED, 60, 0, 0, rout, i,
21 "No Link", 8 );
22 }
23 for(i = 0; i< 20; i++)
24 {
25 sprintf(aux,"TEST_SLAC/CLT%d",i);
26 dis_add_service(aux, "C", aux, strlen(aux)+1, (void *)0, 0);
27 }
28 sprintf(aux,"TEST_SLAC/CLT");
29 dis_start_serving(aux);
30 while(1)
31 pause();
32}
Note: See TracBrowser for help on using the repository browser.