1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
---|
3 | <title>enet: protocol.h Source File</title> |
---|
4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.1 --> |
---|
8 | <div class="tabs"> |
---|
9 | <ul> |
---|
10 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
11 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
12 | <li><a href="classes.html"><span>Data Structures</span></a></li> |
---|
13 | <li id="current"><a href="files.html"><span>Files</span></a></li> |
---|
14 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
15 | </ul></div> |
---|
16 | <div class="tabs"> |
---|
17 | <ul> |
---|
18 | <li><a href="files.html"><span>File List</span></a></li> |
---|
19 | <li><a href="globals.html"><span>Globals</span></a></li> |
---|
20 | </ul></div> |
---|
21 | <h1>protocol.h</h1><a href="protocol_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
22 | <a name="l00005"></a>00005 <span class="preprocessor">#ifndef __ENET_PROTOCOL_H__</span> |
---|
23 | <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __ENET_PROTOCOL_H__</span> |
---|
24 | <a name="l00007"></a>00007 <span class="preprocessor"></span> |
---|
25 | <a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="types_8h.html">enet/types.h</a>"</span> |
---|
26 | <a name="l00009"></a>00009 |
---|
27 | <a name="l00010"></a>00010 <span class="keyword">enum</span> |
---|
28 | <a name="l00011"></a>00011 { |
---|
29 | <a name="l00012"></a>00012 ENET_PROTOCOL_MINIMUM_MTU = 576, |
---|
30 | <a name="l00013"></a>00013 ENET_PROTOCOL_MAXIMUM_MTU = 4096, |
---|
31 | <a name="l00014"></a>00014 ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32, |
---|
32 | <a name="l00015"></a>00015 ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096, |
---|
33 | <a name="l00016"></a>00016 ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 32768, |
---|
34 | <a name="l00017"></a>00017 ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1, |
---|
35 | <a name="l00018"></a>00018 ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255, |
---|
36 | <a name="l00019"></a>00019 ENET_PROTOCOL_MAXIMUM_PEER_ID = 0x7FFF |
---|
37 | <a name="l00020"></a>00020 }; |
---|
38 | <a name="l00021"></a>00021 |
---|
39 | <a name="l00022"></a>00022 <span class="keyword">typedef</span> <span class="keyword">enum</span> |
---|
40 | <a name="l00023"></a>00023 { |
---|
41 | <a name="l00024"></a>00024 ENET_PROTOCOL_COMMAND_NONE = 0, |
---|
42 | <a name="l00025"></a>00025 ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1, |
---|
43 | <a name="l00026"></a>00026 ENET_PROTOCOL_COMMAND_CONNECT = 2, |
---|
44 | <a name="l00027"></a>00027 ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3, |
---|
45 | <a name="l00028"></a>00028 ENET_PROTOCOL_COMMAND_DISCONNECT = 4, |
---|
46 | <a name="l00029"></a>00029 ENET_PROTOCOL_COMMAND_PING = 5, |
---|
47 | <a name="l00030"></a>00030 ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6, |
---|
48 | <a name="l00031"></a>00031 ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7, |
---|
49 | <a name="l00032"></a>00032 ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8, |
---|
50 | <a name="l00033"></a>00033 ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9, |
---|
51 | <a name="l00034"></a>00034 ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10, |
---|
52 | <a name="l00035"></a>00035 ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11, |
---|
53 | <a name="l00036"></a>00036 ENET_PROTOCOL_COMMAND_COUNT = 12, |
---|
54 | <a name="l00037"></a>00037 |
---|
55 | <a name="l00038"></a>00038 ENET_PROTOCOL_COMMAND_MASK = 0x0F |
---|
56 | <a name="l00039"></a>00039 } ENetProtocolCommand; |
---|
57 | <a name="l00040"></a>00040 |
---|
58 | <a name="l00041"></a>00041 <span class="keyword">typedef</span> <span class="keyword">enum</span> |
---|
59 | <a name="l00042"></a>00042 { |
---|
60 | <a name="l00043"></a>00043 ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7), |
---|
61 | <a name="l00044"></a>00044 ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6), |
---|
62 | <a name="l00045"></a>00045 |
---|
63 | <a name="l00046"></a>00046 ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15), |
---|
64 | <a name="l00047"></a>00047 ENET_PROTOCOL_HEADER_FLAG_MASK = 0x8000 |
---|
65 | <a name="l00048"></a>00048 } ENetProtocolFlag; |
---|
66 | <a name="l00049"></a>00049 |
---|
67 | <a name="l00050"></a>00050 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
68 | <a name="l00051"></a>00051 <span class="keyword"></span>{ |
---|
69 | <a name="l00052"></a>00052 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> checksum; |
---|
70 | <a name="l00053"></a>00053 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> peerID; |
---|
71 | <a name="l00054"></a>00054 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> sentTime; |
---|
72 | <a name="l00055"></a>00055 } ENetProtocolHeader; |
---|
73 | <a name="l00056"></a>00056 |
---|
74 | <a name="l00057"></a>00057 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
75 | <a name="l00058"></a>00058 <span class="keyword"></span>{ |
---|
76 | <a name="l00059"></a>00059 <a class="code" href="types_8h.html#34ce80c65abc6389fe0121a83d757f07">enet_uint8</a> command; |
---|
77 | <a name="l00060"></a>00060 <a class="code" href="types_8h.html#34ce80c65abc6389fe0121a83d757f07">enet_uint8</a> channelID; |
---|
78 | <a name="l00061"></a>00061 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> reliableSequenceNumber; |
---|
79 | <a name="l00062"></a>00062 } ENetProtocolCommandHeader; |
---|
80 | <a name="l00063"></a>00063 |
---|
81 | <a name="l00064"></a>00064 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
82 | <a name="l00065"></a>00065 <span class="keyword"></span>{ |
---|
83 | <a name="l00066"></a>00066 ENetProtocolCommandHeader header; |
---|
84 | <a name="l00067"></a>00067 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> receivedReliableSequenceNumber; |
---|
85 | <a name="l00068"></a>00068 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> receivedSentTime; |
---|
86 | <a name="l00069"></a>00069 } ENetProtocolAcknowledge; |
---|
87 | <a name="l00070"></a>00070 |
---|
88 | <a name="l00071"></a>00071 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
89 | <a name="l00072"></a>00072 <span class="keyword"></span>{ |
---|
90 | <a name="l00073"></a>00073 ENetProtocolCommandHeader header; |
---|
91 | <a name="l00074"></a>00074 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> outgoingPeerID; |
---|
92 | <a name="l00075"></a>00075 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> mtu; |
---|
93 | <a name="l00076"></a>00076 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> windowSize; |
---|
94 | <a name="l00077"></a>00077 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> channelCount; |
---|
95 | <a name="l00078"></a>00078 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> incomingBandwidth; |
---|
96 | <a name="l00079"></a>00079 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> outgoingBandwidth; |
---|
97 | <a name="l00080"></a>00080 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleInterval; |
---|
98 | <a name="l00081"></a>00081 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleAcceleration; |
---|
99 | <a name="l00082"></a>00082 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleDeceleration; |
---|
100 | <a name="l00083"></a>00083 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> sessionID; |
---|
101 | <a name="l00084"></a>00084 } ENetProtocolConnect; |
---|
102 | <a name="l00085"></a>00085 |
---|
103 | <a name="l00086"></a>00086 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
104 | <a name="l00087"></a>00087 <span class="keyword"></span>{ |
---|
105 | <a name="l00088"></a>00088 ENetProtocolCommandHeader header; |
---|
106 | <a name="l00089"></a>00089 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> outgoingPeerID; |
---|
107 | <a name="l00090"></a>00090 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> mtu; |
---|
108 | <a name="l00091"></a>00091 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> windowSize; |
---|
109 | <a name="l00092"></a>00092 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> channelCount; |
---|
110 | <a name="l00093"></a>00093 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> incomingBandwidth; |
---|
111 | <a name="l00094"></a>00094 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> outgoingBandwidth; |
---|
112 | <a name="l00095"></a>00095 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleInterval; |
---|
113 | <a name="l00096"></a>00096 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleAcceleration; |
---|
114 | <a name="l00097"></a>00097 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleDeceleration; |
---|
115 | <a name="l00098"></a>00098 } ENetProtocolVerifyConnect; |
---|
116 | <a name="l00099"></a>00099 |
---|
117 | <a name="l00100"></a>00100 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
118 | <a name="l00101"></a>00101 <span class="keyword"></span>{ |
---|
119 | <a name="l00102"></a>00102 ENetProtocolCommandHeader header; |
---|
120 | <a name="l00103"></a>00103 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> incomingBandwidth; |
---|
121 | <a name="l00104"></a>00104 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> outgoingBandwidth; |
---|
122 | <a name="l00105"></a>00105 } ENetProtocolBandwidthLimit; |
---|
123 | <a name="l00106"></a>00106 |
---|
124 | <a name="l00107"></a>00107 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
125 | <a name="l00108"></a>00108 <span class="keyword"></span>{ |
---|
126 | <a name="l00109"></a>00109 ENetProtocolCommandHeader header; |
---|
127 | <a name="l00110"></a>00110 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleInterval; |
---|
128 | <a name="l00111"></a>00111 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleAcceleration; |
---|
129 | <a name="l00112"></a>00112 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> packetThrottleDeceleration; |
---|
130 | <a name="l00113"></a>00113 } ENetProtocolThrottleConfigure; |
---|
131 | <a name="l00114"></a>00114 |
---|
132 | <a name="l00115"></a>00115 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
133 | <a name="l00116"></a>00116 <span class="keyword"></span>{ |
---|
134 | <a name="l00117"></a>00117 ENetProtocolCommandHeader header; |
---|
135 | <a name="l00118"></a>00118 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> data; |
---|
136 | <a name="l00119"></a>00119 } ENetProtocolDisconnect; |
---|
137 | <a name="l00120"></a>00120 |
---|
138 | <a name="l00121"></a>00121 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
139 | <a name="l00122"></a>00122 <span class="keyword"></span>{ |
---|
140 | <a name="l00123"></a>00123 ENetProtocolCommandHeader header; |
---|
141 | <a name="l00124"></a>00124 } ENetProtocolPing; |
---|
142 | <a name="l00125"></a>00125 |
---|
143 | <a name="l00126"></a>00126 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
144 | <a name="l00127"></a>00127 <span class="keyword"></span>{ |
---|
145 | <a name="l00128"></a>00128 ENetProtocolCommandHeader header; |
---|
146 | <a name="l00129"></a>00129 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> dataLength; |
---|
147 | <a name="l00130"></a>00130 } ENetProtocolSendReliable; |
---|
148 | <a name="l00131"></a>00131 |
---|
149 | <a name="l00132"></a>00132 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
150 | <a name="l00133"></a>00133 <span class="keyword"></span>{ |
---|
151 | <a name="l00134"></a>00134 ENetProtocolCommandHeader header; |
---|
152 | <a name="l00135"></a>00135 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> unreliableSequenceNumber; |
---|
153 | <a name="l00136"></a>00136 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> dataLength; |
---|
154 | <a name="l00137"></a>00137 } ENetProtocolSendUnreliable; |
---|
155 | <a name="l00138"></a>00138 |
---|
156 | <a name="l00139"></a>00139 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
157 | <a name="l00140"></a>00140 <span class="keyword"></span>{ |
---|
158 | <a name="l00141"></a>00141 ENetProtocolCommandHeader header; |
---|
159 | <a name="l00142"></a>00142 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> unsequencedGroup; |
---|
160 | <a name="l00143"></a>00143 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> dataLength; |
---|
161 | <a name="l00144"></a>00144 } ENetProtocolSendUnsequenced; |
---|
162 | <a name="l00145"></a>00145 |
---|
163 | <a name="l00146"></a>00146 <span class="keyword">typedef</span> <span class="keyword">struct</span> |
---|
164 | <a name="l00147"></a>00147 <span class="keyword"></span>{ |
---|
165 | <a name="l00148"></a>00148 ENetProtocolCommandHeader header; |
---|
166 | <a name="l00149"></a>00149 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> startSequenceNumber; |
---|
167 | <a name="l00150"></a>00150 <a class="code" href="types_8h.html#245102585fdf31bdf208639ef47bec5d">enet_uint16</a> dataLength; |
---|
168 | <a name="l00151"></a>00151 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> fragmentCount; |
---|
169 | <a name="l00152"></a>00152 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> fragmentNumber; |
---|
170 | <a name="l00153"></a>00153 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> totalLength; |
---|
171 | <a name="l00154"></a>00154 <a class="code" href="types_8h.html#5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> fragmentOffset; |
---|
172 | <a name="l00155"></a>00155 } ENetProtocolSendFragment; |
---|
173 | <a name="l00156"></a>00156 |
---|
174 | <a name="l00157"></a>00157 <span class="keyword">typedef</span> <span class="keyword">union</span> |
---|
175 | <a name="l00158"></a>00158 <span class="keyword"></span>{ |
---|
176 | <a name="l00159"></a>00159 ENetProtocolCommandHeader header; |
---|
177 | <a name="l00160"></a>00160 ENetProtocolAcknowledge acknowledge; |
---|
178 | <a name="l00161"></a>00161 ENetProtocolConnect connect; |
---|
179 | <a name="l00162"></a>00162 ENetProtocolVerifyConnect verifyConnect; |
---|
180 | <a name="l00163"></a>00163 ENetProtocolDisconnect disconnect; |
---|
181 | <a name="l00164"></a>00164 ENetProtocolPing ping; |
---|
182 | <a name="l00165"></a>00165 ENetProtocolSendReliable sendReliable; |
---|
183 | <a name="l00166"></a>00166 ENetProtocolSendUnreliable sendUnreliable; |
---|
184 | <a name="l00167"></a>00167 ENetProtocolSendUnsequenced sendUnsequenced; |
---|
185 | <a name="l00168"></a>00168 ENetProtocolSendFragment sendFragment; |
---|
186 | <a name="l00169"></a>00169 ENetProtocolBandwidthLimit bandwidthLimit; |
---|
187 | <a name="l00170"></a>00170 ENetProtocolThrottleConfigure throttleConfigure; |
---|
188 | <a name="l00171"></a>00171 } ENetProtocol; |
---|
189 | <a name="l00172"></a>00172 |
---|
190 | <a name="l00173"></a>00173 <span class="preprocessor">#endif </span><span class="comment">/* __ENET_PROTOCOL_H__ */</span> |
---|
191 | <a name="l00174"></a>00174 |
---|
192 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Jun 6 14:33:50 2007 for enet by |
---|
193 | <a href="http://www.doxygen.org/index.html"> |
---|
194 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> |
---|
195 | </body> |
---|
196 | </html> |
---|