… | |
… | |
21 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | --> |
22 | --> |
23 | </head> |
23 | </head> |
24 | <body> |
24 | <body> |
25 | |
25 | |
26 | <h1>$Revision: 1.77 $</h1> |
26 | <h1>$Revision: 1.78 $</h1> |
27 | |
27 | |
28 | <h1>KGS Protocol Description</h1> |
28 | <h1>KGS Protocol Description</h1> |
29 | |
29 | |
30 | <p>This XML document describes the KGS protocol. It is also used |
30 | <p>This XML document describes the KGS protocol. It is also used |
31 | to automatically generate the perl parser for all the messages and |
31 | to automatically generate the perl parser for all the messages and |
… | |
… | |
95 | + (rand[i] * 0x04c2af9b + 0xfffffffb); xorbyte = rand >> |
95 | + (rand[i] * 0x04c2af9b + 0xfffffffb); xorbyte = rand >> |
96 | 24</code>, all in 32 bit unsigned iso-c arithmetic.</p> |
96 | 24</code>, all in 32 bit unsigned iso-c arithmetic.</p> |
97 | |
97 | |
98 | <member name="type" type="U16"/> |
98 | <member name="type" type="U16"/> |
99 | <p>If the type is >= 0x4000 this is a message for a specific channel. The channel |
99 | <p>If the type is >= 0x4000 this is a message for a specific channel. The channel |
100 | number is always the next U16.</p> |
100 | number is always the next U16. All of these channel values are valid, including zero.</p> |
101 | |
101 | |
102 | <p>Beginning with version 2.5.x, a number is <em>added</em> on <em>received</em> |
102 | <p>Beginning with version 2.5.x, a number is <em>added</em> on <em>received</em> |
103 | messages only. The algorithm is as follows: |
103 | messages only. The algorithm is as follows: |
104 | |
104 | |
105 | <pre> |
105 | <pre> |
… | |
… | |
204 | <member name="TEACHING" value="2"/> |
204 | <member name="TEACHING" value="2"/> |
205 | <member name="SIMUL" value="3"/> |
205 | <member name="SIMUL" value="3"/> |
206 | <member name="FREE" value="4"/> |
206 | <member name="FREE" value="4"/> |
207 | <member name="RATED" value="5"/> |
207 | <member name="RATED" value="5"/> |
208 | <member name="PRIVATE" value="128"/> |
208 | <member name="PRIVATE" value="128"/> |
209 | <p>PRIVATE is ored onto DEMONSTRATION or TEACHING</p> |
209 | <p>PRIVATE is or'ed onto DEMONSTRATION or TEACHING</p> |
210 | </enum> |
210 | </enum> |
211 | |
211 | |
212 | <set name="GAMEFLAG"> |
212 | <set name="GAMEFLAG"> |
213 | <member name="SCORED" value="1"/> |
213 | <member name="SCORED" value="1"/> |
214 | <member name="ADJOURNED" value="2"/> |
214 | <member name="ADJOURNED" value="2"/> |