1xpainfo(3) SAORD Documentation xpainfo(3)
2
3
4
6 XPAInfo: send short message to one or more XPA servers
7
9 #include <xpa.h>
10
11 int XPAInfo(XPA xpa,
12 char *template, char *paramlist, char *mode,
13 char **names, char **messages, int n);
14
16 Send a short paramlist message to one or more XPA servers whose
17 class:name identifier matches the specified template.
18
19 A template of the form "class1:name1" is sent to the XPA name server,
20 which returns a list of at most n matching XPA servers. A connection
21 is established with each of these servers and the paramlist string is
22 passed to the server as the data transfer request is initiated. If an
23 XPA struct is passed to the call, then the persistent connections are
24 updated as described above. Otherwise, temporary connections are made
25 to the servers (which will be closed when the call completes).
26
27 The XPAInfo() routine does not send data from a buf to the XPA servers.
28 Only the paramlist is sent. The semantics of the paramlist is not
29 formalized, but at a minimum is should tell the server how to get more
30 information. For example, it might contain the class:name of the XPA
31 access point from which the server (acting as a client) can obtain more
32 info using XPAGet.
33
34 A string containing the class:name and ip:port of each server is
35 returned in the name array. If a given server returned an error or the
36 server callback sends a message back to the client, then the message
37 will be stored in the associated element of the messages array. The
38 returned message string will be of the form:
39
40 XPA$ERROR error-message (class:name ip:port)
41
42 or
43
44 XPA$MESSAGE message (class:name ip:port)
45
46 The return value will contain the actual number of servers that were
47 processed. This value thus will hold the number of valid entries in
48 the names and messages arrays, and can be used to loop through these
49 arrays. In names and/or messages is NULL, no information is passed
50 back in that array.
51
52 The following keywords are recognized:
53
54 key value default explanation
55 ------ -------- -------- -----------
56 ack true/false true if false, don't wait for ack from server
57
58 When ack is false, XPAInfo() will not wait for an error return from the
59 XPA server. This means, in effect, that XPAInfo will send its paramlist
60 string to the XPA server and then exit: no information will be sent
61 from the server to the client. This UDP-like behavior is essential to
62 avoid race conditions in cases where XPA servers are sending info
63 messages to other servers. If two servers try to send each other an
64 info message at the same time and then wait for an ack, a race
65 condition will result and one or both will time out.
66
67 Example:
68
69 (void)XPAInfo(NULL, "IMAGE", "ds9 image", NULL, NULL, NULL, 0);
70
72 See xpa(n) for a list of XPA help pages
73
74
75
76version 2.1.15 July 23, 2013 xpainfo(3)