Project

General

Profile

Htsp » History » Version 10

Andreas Smas, 2009-02-28 16:37

1 1 Andreas Smas
2
3
4
5
6
----
7
8
= Client to Server methods =
9
10 5 Andreas Smas
----
11 1 Andreas Smas
=== getChallenge ===
12
13 7 Andreas Smas
Request a 32 byte challenge used to generate a authentication digest.
14
15
Request message fields:
16
{{{
17
None
18
}}}
19
20
Reply message fields:
21
{{{
22 9 Andreas Smas
challenge        bin  required   32 bytes of random challenge to be used in next authentication request from client.
23 7 Andreas Smas
}}}
24
25
26 5 Andreas Smas
----
27 1 Andreas Smas
=== authenticate ===
28
29 7 Andreas Smas
Request message fields:
30
{{{
31 8 Andreas Smas
username         str  required   Username.
32
digest           bin  required   SHA-1 hash of [password (not including terminating NUL)] + [challenge]
33 7 Andreas Smas
}}}
34
35
Reply message fields:
36
{{{
37 1 Andreas Smas
noaccess         int  optional   Set to '1' if access was denied.
38 9 Andreas Smas
challenge        bin  optional   32 bytes of random challenge to be used in next authentication request from client.
39
                                 Always present if 'noaccess' is set. This is supplied so the client does not have
40
                                 to issue an extra 'getChallenge' request.
41 7 Andreas Smas
}}}
42
43
44 5 Andreas Smas
----
45 10 Andreas Smas
=== setAsync ===
46
47
Switch the session into asynchronous mode.
48
When a session is in this mode the client will get continuous updates from the server about channels and tags.
49
This also includes creation and deletion of channels and tags. 
50
51
An interactive application that presents the user with information about channels and tags would probably want to switch to this mode.
52
53
54
Request message fields:
55
{{{
56
None
57
}}}
58
59
Reply message fields:
60
{{{
61
None
62
}}}
63
64
65 1 Andreas Smas
66 5 Andreas Smas
----
67 1 Andreas Smas
=== getEvent ===
68 6 Andreas Smas
69
----
70 1 Andreas Smas
=== subscribe ===
71 6 Andreas Smas
72
Request subscription to the given channel. A request for a subscription is always successful.
73
When the server is ready to transmit data it will first send a 'subscriptionStart' message.
74 4 Andreas Smas
75
76 1 Andreas Smas
77
Request message fields:
78
{{{
79 8 Andreas Smas
channelId        int  required   ID for channel. 
80
subscriptionId   int  required   Subscription ID. Selected by client. This value is not interpreted by the server in any form. 
81
                                 The value is used from now on in all messages related to the subscription.
82 1 Andreas Smas
}}}
83 6 Andreas Smas
84
Reply message fields:
85
{{{
86
None.
87 4 Andreas Smas
}}}
88 6 Andreas Smas
89 5 Andreas Smas
90 1 Andreas Smas
----
91 5 Andreas Smas
=== unsubscribe ===
92 1 Andreas Smas
93 5 Andreas Smas
Stop a subscription.
94
Attributes
95
{{{
96 8 Andreas Smas
subscriptionId   int  required   Subscription ID.
97 1 Andreas Smas
}}}
98
99 6 Andreas Smas
Reply message fields:
100
{{{
101
None.
102
}}}
103 2 Andreas Smas
104
105
----
106
107
= Server to Client methods =
108
109
=== channelAdd ===
110
111 3 Andreas Smas
Only sent if session is in async mode.
112
113 2 Andreas Smas
=== channelUpdate ===
114
115 3 Andreas Smas
Only sent if session is in async mode.
116
117 2 Andreas Smas
=== channelDelete ===
118
119 3 Andreas Smas
Only sent if session is in async mode.
120
121 2 Andreas Smas
=== tagAdd ===
122
123 3 Andreas Smas
Only sent if session is in async mode.
124
125 2 Andreas Smas
=== tagUpdate ===
126
127 3 Andreas Smas
Only sent if session is in async mode.
128
129 2 Andreas Smas
=== tagDelete ===
130 3 Andreas Smas
131
Only sent if session is in async mode.
132 2 Andreas Smas
133
=== subscriptionStart ===
134
135
=== subscriptionStop ===
136
137
=== subscriptionStatus ===
138
139
=== queueStatus ===