Last change
on this file since 19594 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:
587 bytes
|
Line | |
---|
1 | // db_dim_server.c : Defines the entry point for the console application.
|
---|
2 | //
|
---|
3 | // Dietrich Beck
|
---|
4 | //
|
---|
5 | // This is a DIM test server. It just publishes a servivce and updates
|
---|
6 | // that service very fast.
|
---|
7 |
|
---|
8 | #include <stdio.h>
|
---|
9 | #include <sys/timeb.h>
|
---|
10 | #include <time.h>
|
---|
11 | #include <dis.h>
|
---|
12 |
|
---|
13 | #define BUFFSIZE 10000000
|
---|
14 |
|
---|
15 | char buffer[BUFFSIZE];
|
---|
16 | int service_id;
|
---|
17 | int size=10000;
|
---|
18 | int count;
|
---|
19 |
|
---|
20 | void main()
|
---|
21 | {
|
---|
22 | service_id = dis_add_service("testBuffer","C",buffer,size,0,0);
|
---|
23 | dis_start_serving("DIS_TEST");
|
---|
24 | count = 0;
|
---|
25 | while(1)
|
---|
26 | {
|
---|
27 | sprintf(buffer,"%d", count);
|
---|
28 | dis_update_service(service_id);
|
---|
29 | count++;
|
---|
30 | }
|
---|
31 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.