… | |
… | |
20 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | --> |
21 | --> |
22 | </head> |
22 | </head> |
23 | <body> |
23 | <body> |
24 | |
24 | |
25 | <h1>$Revision: 1.47 $</h1> |
25 | <h1>$Revision: 1.48 $</h1> |
26 | |
26 | |
27 | <h1>KGS Protocol Description</h1> |
27 | <h1>KGS Protocol Description</h1> |
28 | |
28 | |
29 | <p>This XML document describes the KGS protocol. It is also used |
29 | <p>This XML document describes the KGS protocol. It is also used |
30 | to automatically generate the perl parser for all the messages and |
30 | to automatically generate the perl parser for all the messages and |
… | |
… | |
61 | |
61 | |
62 | <p>Everything on the wire is in little-endian format (what a shame).</p> |
62 | <p>Everything on the wire is in little-endian format (what a shame).</p> |
63 | |
63 | |
64 | <p>Primitive types are mostly integers (signed |
64 | <p>Primitive types are mostly integers (signed |
65 | "<code>I</code><bits>", unsigned "<code>U</code><bits>"), |
65 | "<code>I</code><bits>", unsigned "<code>U</code><bits>"), |
66 | ascii strings ("<code>username</code>"), or zero-terminated |
66 | ascii strings ("<code>username</code>"), zero- or non-terminated |
67 | UCS2-Strings ("<code>STRING</code>"). Yes, I know java is supposed to |
67 | UCS2-Strings ("<code>ZSTRING</code>" or "<code>STRING</code>"). Yes, |
68 | do UTF-16, but no implementation seems to care...</p> |
68 | I know java is supposed to do UTF-16, but no implementation seems to |
|
|
69 | care...</p> |
69 | |
70 | |
70 | <p>For the rest, go figure or bug me, <a href="mailto:pcg@goof.com">Marc Lehmann <pcg@goof.com></a> |
71 | <p>For the rest, go figure or bug me, <a href="mailto:pcg@goof.com">Marc Lehmann <pcg@goof.com></a> |
71 | </p> |
72 | </p> |
72 | |
73 | |
73 | <h2>Stream and message structure.</h2> |
74 | <h2>Stream and message structure.</h2> |
… | |
… | |
845 | |
846 | |
846 | <h4>STRUCTURE rules</h4> |
847 | <h4>STRUCTURE rules</h4> |
847 | CLASS: KGS::Rules<br /> |
848 | CLASS: KGS::Rules<br /> |
848 | <p> |
849 | <p> |
849 | |
850 | |
850 | <p>This structure is used for challanges as well as in the special |
851 | <p>This structure is used for challenges as well as in the special |
851 | TREE "subprotocol". It tightly encodes the game parameters.</p> |
852 | TREE "subprotocol". It tightly encodes the game parameters.</p> |
852 | </p> |
853 | </p> |
853 | <table border="1" width="100%"> |
854 | <table border="1" width="100%"> |
854 | <tr> |
855 | <tr> |
855 | <th width="10%">NAME</th> |
856 | <th width="10%">NAME</th> |
… | |
… | |
1752 | |
1753 | |
1753 | </td> |
1754 | </td> |
1754 | </tr> |
1755 | </tr> |
1755 | <tr> |
1756 | <tr> |
1756 | <td>name</td> |
1757 | <td>name</td> |
1757 | <td>STRING</td> |
1758 | <td>ZSTRING</td> |
1758 | <td> </td> |
1759 | <td> </td> |
1759 | <td> |
1760 | <td> |
1760 | |
1761 | |
1761 | |
1762 | |
1762 | </td> |
1763 | </td> |
… | |
… | |
1765 | |
1766 | |
1766 | </td> |
1767 | </td> |
1767 | </tr> |
1768 | </tr> |
1768 | <tr> |
1769 | <tr> |
1769 | <td>description</td> |
1770 | <td>description</td> |
1770 | <td>STRING</td> |
1771 | <td>ZSTRING</td> |
1771 | <td> </td> |
1772 | <td> </td> |
1772 | <td> |
1773 | <td> |
1773 | |
1774 | |
1774 | |
1775 | |
1775 | </td> |
1776 | </td> |
… | |
… | |
2897 | <th width="10%">GUARD</th> |
2898 | <th width="10%">GUARD</th> |
2898 | </tr> |
2899 | </tr> |
2899 | <tr> |
2900 | <tr> |
2900 | <td>channel</td> |
2901 | <td>channel</td> |
2901 | <td>U16</td> |
2902 | <td>U16</td> |
|
|
2903 | <td> </td> |
|
|
2904 | <td> |
|
|
2905 | |
|
|
2906 | |
|
|
2907 | </td> |
|
|
2908 | <td> |
|
|
2909 | <b></b> |
|
|
2910 | |
|
|
2911 | </td> |
|
|
2912 | </tr> |
|
|
2913 | </table> |
|
|
2914 | |
|
|
2915 | <h4> |
|
|
2916 | <a name="C4434"></a>ORIGIN: CLIENT; |
|
|
2917 | MESSAGE: set_quiet</h4> |
|
|
2918 | NUMERIC TYPE (hex): 4434<p> |
|
|
2919 | <p>Sets (or clears) the quiet flag on a game.</p> |
|
|
2920 | </p> |
|
|
2921 | <table border="1" width="100%"> |
|
|
2922 | <tr> |
|
|
2923 | <th width="10%">NAME</th> |
|
|
2924 | <th width="8%">TYPE</th> |
|
|
2925 | <th width="4%">VALUE</th> |
|
|
2926 | <th>DESCRIPTION</th> |
|
|
2927 | <th width="10%">GUARD</th> |
|
|
2928 | </tr> |
|
|
2929 | <tr> |
|
|
2930 | <td>channel</td> |
|
|
2931 | <td>U16</td> |
|
|
2932 | <td> </td> |
|
|
2933 | <td> |
|
|
2934 | |
|
|
2935 | |
|
|
2936 | </td> |
|
|
2937 | <td> |
|
|
2938 | <b></b> |
|
|
2939 | |
|
|
2940 | </td> |
|
|
2941 | </tr> |
|
|
2942 | <tr> |
|
|
2943 | <td>quiet</td> |
|
|
2944 | <td>U8</td> |
2902 | <td> </td> |
2945 | <td> </td> |
2903 | <td> |
2946 | <td> |
2904 | |
2947 | |
2905 | |
2948 | |
2906 | </td> |
2949 | </td> |
… | |
… | |
4973 | <th>DESCRIPTION</th> |
5016 | <th>DESCRIPTION</th> |
4974 | <th width="10%">GUARD</th> |
5017 | <th width="10%">GUARD</th> |
4975 | </tr> |
5018 | </tr> |
4976 | <tr> |
5019 | <tr> |
4977 | <td>s1</td> |
5020 | <td>s1</td> |
4978 | <td>STRING</td> |
5021 | <td>ZSTRING</td> |
4979 | <td> </td> |
5022 | <td> </td> |
4980 | <td> |
5023 | <td> |
4981 | |
5024 | |
4982 | |
5025 | |
4983 | </td> |
5026 | </td> |
… | |
… | |
4986 | |
5029 | |
4987 | </td> |
5030 | </td> |
4988 | </tr> |
5031 | </tr> |
4989 | <tr> |
5032 | <tr> |
4990 | <td>s2</td> |
5033 | <td>s2</td> |
4991 | <td>STRING</td> |
5034 | <td>ZSTRING</td> |
4992 | <td> </td> |
5035 | <td> </td> |
4993 | <td> |
5036 | <td> |
4994 | |
5037 | |
4995 | |
5038 | |
4996 | </td> |
5039 | </td> |
… | |
… | |
4999 | |
5042 | |
5000 | </td> |
5043 | </td> |
5001 | </tr> |
5044 | </tr> |
5002 | <tr> |
5045 | <tr> |
5003 | <td>s3</td> |
5046 | <td>s3</td> |
5004 | <td>STRING</td> |
5047 | <td>ZSTRING</td> |
5005 | <td> </td> |
5048 | <td> </td> |
5006 | <td> |
5049 | <td> |
5007 | |
5050 | |
5008 | |
5051 | |
5009 | </td> |
5052 | </td> |
… | |
… | |
5012 | |
5055 | |
5013 | </td> |
5056 | </td> |
5014 | </tr> |
5057 | </tr> |
5015 | <tr> |
5058 | <tr> |
5016 | <td>s4</td> |
5059 | <td>s4</td> |
5017 | <td>STRING</td> |
5060 | <td>ZSTRING</td> |
5018 | <td> </td> |
5061 | <td> </td> |
5019 | <td> |
5062 | <td> |
5020 | |
5063 | |
5021 | |
5064 | |
5022 | </td> |
5065 | </td> |
… | |
… | |
5025 | |
5068 | |
5026 | </td> |
5069 | </td> |
5027 | </tr> |
5070 | </tr> |
5028 | <tr> |
5071 | <tr> |
5029 | <td>s5</td> |
5072 | <td>s5</td> |
5030 | <td>STRING</td> |
5073 | <td>ZSTRING</td> |
5031 | <td> </td> |
5074 | <td> </td> |
5032 | <td> |
5075 | <td> |
5033 | |
5076 | |
5034 | |
5077 | |
5035 | </td> |
5078 | </td> |
… | |
… | |
5038 | |
5081 | |
5039 | </td> |
5082 | </td> |
5040 | </tr> |
5083 | </tr> |
5041 | <tr> |
5084 | <tr> |
5042 | <td>s6</td> |
5085 | <td>s6</td> |
5043 | <td>STRING</td> |
5086 | <td>ZSTRING</td> |
5044 | <td> </td> |
5087 | <td> </td> |
5045 | <td> |
5088 | <td> |
5046 | |
5089 | |
5047 | |
5090 | |
5048 | </td> |
5091 | </td> |
… | |
… | |
6784 | </tr> |
6827 | </tr> |
6785 | </table> |
6828 | </table> |
6786 | |
6829 | |
6787 | <h4> |
6830 | <h4> |
6788 | <a name="S4434"></a>ORIGIN: SERVER; |
6831 | <a name="S4434"></a>ORIGIN: SERVER; |
6789 | MESSAGE: unknown4434</h4> |
6832 | MESSAGE: set_quiet</h4> |
6790 | NUMERIC TYPE (hex): 4434<p> |
6833 | NUMERIC TYPE (hex): 4434<p> |
|
|
6834 | <p>Sets (or clears) the quiet flag on a game.</p> |
6791 | </p> |
6835 | </p> |
6792 | <table border="1" width="100%"> |
6836 | <table border="1" width="100%"> |
6793 | <tr> |
6837 | <tr> |
6794 | <th width="10%">NAME</th> |
6838 | <th width="10%">NAME</th> |
6795 | <th width="8%">TYPE</th> |
6839 | <th width="8%">TYPE</th> |
6796 | <th width="4%">VALUE</th> |
6840 | <th width="4%">VALUE</th> |
… | |
… | |
6809 | <b></b> |
6853 | <b></b> |
6810 | |
6854 | |
6811 | </td> |
6855 | </td> |
6812 | </tr> |
6856 | </tr> |
6813 | <tr> |
6857 | <tr> |
6814 | <td>b1</td> |
6858 | <td>quiet</td> |
6815 | <td>U8</td> |
6859 | <td>U8</td> |
6816 | <td> </td> |
6860 | <td> </td> |
6817 | <td> |
6861 | <td> |
6818 | ?? !demonstration game?? |
|
|
6819 | |
6862 | |
6820 | |
6863 | |
6821 | </td> |
|
|
6822 | <td> |
6864 | </td> |
6823 | <b></b> |
|
|
6824 | |
|
|
6825 | </td> |
6865 | <td> |
|
|
6866 | <b></b> |
|
|
6867 | |
6826 | </tr> |
6868 | </td> |
|
|
6869 | </tr> |
6827 | </table> |
6870 | </table> |
6828 | |
6871 | |
6829 | <!-- added recently --> |
|
|
6830 | <h4> |
6872 | <h4> |
6831 | <a name="S443b"></a>ORIGIN: SERVER; |
6873 | <a name="S443b"></a>ORIGIN: SERVER; |
6832 | MESSAGE: del_global_challenge</h4> |
6874 | MESSAGE: del_global_challenge</h4> |
6833 | NUMERIC TYPE (hex): 443b<p> |
6875 | NUMERIC TYPE (hex): 443b<p> |
6834 | <p> |
6876 | <p> |