diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-07-26 20:17:27 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-07-26 20:17:27 +0000 |
commit | 30ec722a3bb6dbb5d77183a8d1e369095fcc361a (patch) | |
tree | f579a5ee5916e7a2eeeffc743c04784cecbfb2c5 | |
parent | b1c1b616dc5bedd79d1603a10f99a90817d3049c (diff) | |
download | luasocket-30ec722a3bb6dbb5d77183a8d1e369095fcc361a.tar.gz luasocket-30ec722a3bb6dbb5d77183a8d1e369095fcc361a.tar.bz2 luasocket-30ec722a3bb6dbb5d77183a8d1e369095fcc361a.zip |
Added Mike's changes to udp.html.
-rw-r--r-- | doc/udp.html | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/doc/udp.html b/doc/udp.html index 75d1d9e..b0c51f6 100644 --- a/doc/udp.html +++ b/doc/udp.html | |||
@@ -153,11 +153,12 @@ there are more than <tt>size</tt> bytes available in the datagram, | |||
153 | the excess bytes are discarded. If there are less then | 153 | the excess bytes are discarded. If there are less then |
154 | <tt>size</tt> bytes available in the current datagram, the | 154 | <tt>size</tt> bytes available in the current datagram, the |
155 | available bytes are returned. If <tt>size</tt> is omitted, the | 155 | available bytes are returned. If <tt>size</tt> is omitted, the |
156 | maximum datagram size is used. | 156 | maximum datagram size is used (which is currently limited by the |
157 | implementation to 8192 bytes). | ||
157 | </p> | 158 | </p> |
158 | 159 | ||
159 | <p class="return"> | 160 | <p class="return"> |
160 | In case of success, the method return the | 161 | In case of success, the method returns the |
161 | received datagram. In case of timeout, the method returns | 162 | received datagram. In case of timeout, the method returns |
162 | <b><tt>nil</tt></b> followed by the string '<tt>timeout</tt>'. | 163 | <b><tt>nil</tt></b> followed by the string '<tt>timeout</tt>'. |
163 | </p> | 164 | </p> |
@@ -187,13 +188,14 @@ Sends a datagram to the UDP peer of a connected object. | |||
187 | 188 | ||
188 | <p class="parameters"> | 189 | <p class="parameters"> |
189 | <tt>Datagram</tt> is a string with the datagram contents. | 190 | <tt>Datagram</tt> is a string with the datagram contents. |
190 | Beware that the maximum datagram size for UDP is 576 bytes. | 191 | The maximum datagram size for UDP is 64K minus IP layer overhead. |
192 | However datagrams larger than the link layer packet size will be | ||
193 | fragmented, which may deteriorate performance and/or reliability. | ||
191 | </p> | 194 | </p> |
192 | 195 | ||
193 | <p class="return"> | 196 | <p class="return"> |
194 | If successful, the method returns 1. In case of | 197 | If successful, the method returns 1. In case of |
195 | error, the method returns <b><tt>nil</tt></b> followed by the | 198 | error, the method returns <b><tt>nil</tt></b> followed by an error message. |
196 | '<tt>refused</tt>' message. | ||
197 | </p> | 199 | </p> |
198 | 200 | ||
199 | <p class="note"> | 201 | <p class="note"> |
@@ -215,16 +217,19 @@ Sends a datagram to the specified IP address and port number. | |||
215 | 217 | ||
216 | <p class="parameters"> | 218 | <p class="parameters"> |
217 | <tt>Datagram</tt> is a string with the | 219 | <tt>Datagram</tt> is a string with the |
218 | datagram contents. Beware that the maximum datagram size for UDP is | 220 | datagram contents. |
219 | 576 bytes. <tt>Ip</tt> is the IP address of the recipient. Host | 221 | The maximum datagram size for UDP is 64K minus IP layer overhead. |
220 | names are <em>not</em> allowed for performance reasons. | 222 | However datagrams larger than the link layer packet size will be |
223 | fragmented, which may deteriorate performance and/or reliability. | ||
224 | <tt>Ip</tt> is the IP address of the recipient. | ||
225 | Host names are <em>not</em> allowed for performance reasons. | ||
226 | |||
221 | <tt>Port</tt> is the port number at the recipient. | 227 | <tt>Port</tt> is the port number at the recipient. |
222 | </p> | 228 | </p> |
223 | 229 | ||
224 | <p class="return"> | 230 | <p class="return"> |
225 | If successful, the method returns 1. In case of | 231 | If successful, the method returns 1. In case of |
226 | error, the method returns <b><tt>nil</tt></b> followed by the | 232 | error, the method returns <b><tt>nil</tt></b> followed by an error message. |
227 | '<tt>refused</tt>' message. | ||
228 | </p> | 233 | </p> |
229 | 234 | ||
230 | <p class="note"> | 235 | <p class="note"> |