summaryrefslogtreecommitdiffstats
path: root/xpa/doc/pod/xpacode.pod
blob: c5ea647d5d1ed43c7df87387c947d03e236a8ddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
=pod

=head1 NAME



B<XPACode: Where to Find Example/Test Code>



=head1 SYNOPSIS





The XPA source code directory contains two test programs,
I<stest.c>, and I<ctest.c> that can serve as
examples for writing XPA servers and clients, respectively.
They also can be used to test various features of XPA.



=head1 DESCRIPTION





To build the XPA test programs, execute:

   make All

in the XPA source directory to generate the I<stest> and
I<ctest> programs.  (NB: this should work on all platforms,
although we have had problems with unresolved externals on one
Sun/Solaris machine, for reasons still unknown.)

The stest program can be executed with no arguments to start
an XPA server that contains the access points: xpa, xpa1,
c_xpa (containing sub-commands cmd1 and cmd2), and i_xpa.
You then can use xpaset and xpaget to interact with these access points:

  cat xpa.c | xpaset xpa      # send to xpa
  cat xpa.c | xpaset "xpa*"   # send to xpa and xpa1
  xpaget xpa                  # receive from xpa
  xpaget xpa*                 # receive from xpa and xpa1

etc. You also can use ctest to do the same thing, or to iterate:

  ctest -s -l 100 xpa        # send to xpa 100 times
  ctest -s -l 100 "xpa*"     # send to xpa and xpa1 100 times
  ctest -g -l 100 xpa        # receive from xpa 100 times
  ctest -g -l 100 "xpa*"     # receive from xpa and xpa1 100 times

More options are available: see the stest.c and ctest.c code itself, which
were used extensively to debug XPA.


The file test.tcl in the XPA source directory gives examples for using the 
XPATclInterface.



=head1 SEE ALSO



See xpa(n) for a list of XPA help pages



=cut