source: trunk/FACT++/dim/src/examples/test_server_slac.c@ 19167

Last change on this file since 19167 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: 597 bytes
Line 
1#include <stdio.h>
2#include <dis.h>
3#include <dic.h>
4
5char str[10][80];
6
7void rout( tag, buf, size )
8char *buf;
9int *tag, *size;
10{
11 printf("%s Received for Server %d\n", buf, *tag);
12}
13
14main(argc,argv)
15int argc;
16char **argv;
17{
18 char aux[80];
19 int n;
20
21 sscanf(argv[1], "%d", &n);
22 sprintf(aux,"TEST_SLAC/SRV%d",n);
23 sprintf(str[0], aux);
24 dis_add_service(aux, "C", str[0], strlen(str[0])+1, (void *)0, 0);
25 sprintf(aux,"TEST_SLAC/%d",n);
26 dis_start_serving(aux);
27 sprintf(aux,"TEST_SLAC/CLT%d",n);
28 dic_info_service( aux, TIMED, 60, 0, 0, rout, n,
29 "No Link", 8 );
30 while(1)
31 {
32 pause();
33 }
34}
35
Note: See TracBrowser for help on using the repository browser.