diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2015-10-05 11:47:51 +0800 |
---|---|---|
committer | Diego Nehab <diego.nehab@gmail.com> | 2015-10-05 11:47:51 +0800 |
commit | fd729b32a8966291f007567f72f3dc0158bdab35 (patch) | |
tree | 46737842ba3f9a5aaa2325a76724f12fbc53353e /doc | |
parent | d1ec29be7f982db75864155dd61a058902e1cae2 (diff) | |
download | luasocket-fd729b32a8966291f007567f72f3dc0158bdab35.tar.gz luasocket-fd729b32a8966291f007567f72f3dc0158bdab35.tar.bz2 luasocket-fd729b32a8966291f007567f72f3dc0158bdab35.zip |
Added support for arbitrary datagram sizes.
The maximum size is still constant per UDP object, but the
size can be speficied at creation time.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/udp.html | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/doc/udp.html b/doc/udp.html index a300f2f..22d7c72 100644 --- a/doc/udp.html +++ b/doc/udp.html | |||
@@ -42,7 +42,7 @@ | |||
42 | <!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 42 | <!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
43 | 43 | ||
44 | <p class="name" id="socket.udp"> | 44 | <p class="name" id="socket.udp"> |
45 | socket.<b>udp()</b> | 45 | socket.<b>udp(</b>[buffersize]<b>)</b> |
46 | </p> | 46 | </p> |
47 | 47 | ||
48 | <p class="description"> | 48 | <p class="description"> |
@@ -62,6 +62,13 @@ The <a href="#setpeername"><tt>setpeername</tt></a> | |||
62 | is used to connect the object. | 62 | is used to connect the object. |
63 | </p> | 63 | </p> |
64 | 64 | ||
65 | <p class="parameters"> | ||
66 | The optional <tt>buffersize</tt> parameter | ||
67 | specifies the size of the largest datagram that will | ||
68 | ever be received by the UDP object. The default value is | ||
69 | 8192. | ||
70 | </p> | ||
71 | |||
65 | <p class="return"> | 72 | <p class="return"> |
66 | In case of success, a new unconnected UDP object | 73 | In case of success, a new unconnected UDP object |
67 | returned. In case of error, <b><tt>nil</tt></b> is returned, followed by | 74 | returned. In case of error, <b><tt>nil</tt></b> is returned, followed by |
@@ -85,7 +92,7 @@ href=#setoption><tt>setoption</tt></a> will fail. | |||
85 | <!-- socket.udp4 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 92 | <!-- socket.udp4 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
86 | 93 | ||
87 | <p class="name" id="socket.udp"> | 94 | <p class="name" id="socket.udp"> |
88 | socket.<b>udp4()</b> | 95 | socket.<b>udp4(</b>[buffersize]<b>)</b> |
89 | </p> | 96 | </p> |
90 | 97 | ||
91 | <p class="description"> | 98 | <p class="description"> |
@@ -105,6 +112,13 @@ The <a href="#setpeername"><tt>setpeername</tt></a> | |||
105 | is used to connect the object. | 112 | is used to connect the object. |
106 | </p> | 113 | </p> |
107 | 114 | ||
115 | <p class="parameters"> | ||
116 | The optional <tt>buffersize</tt> parameter | ||
117 | specifies the size of the largest datagram that will | ||
118 | ever be received by the UDP object. The default value is | ||
119 | 8192. | ||
120 | </p> | ||
121 | |||
108 | <p class="return"> | 122 | <p class="return"> |
109 | In case of success, a new unconnected UDP object | 123 | In case of success, a new unconnected UDP object |
110 | returned. In case of error, <b><tt>nil</tt></b> is returned, followed by | 124 | returned. In case of error, <b><tt>nil</tt></b> is returned, followed by |
@@ -114,7 +128,7 @@ an error message. | |||
114 | <!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 128 | <!-- socket.udp ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
115 | 129 | ||
116 | <p class="name" id="socket.udp6"> | 130 | <p class="name" id="socket.udp6"> |
117 | socket.<b>udp6()</b> | 131 | socket.<b>udp6(</b>[buffersize]<b>)</b> |
118 | </p> | 132 | </p> |
119 | 133 | ||
120 | <p class="description"> | 134 | <p class="description"> |
@@ -134,6 +148,13 @@ The <a href="#setpeername"><tt>setpeername</tt></a> | |||
134 | is used to connect the object. | 148 | is used to connect the object. |
135 | </p> | 149 | </p> |
136 | 150 | ||
151 | <p class="parameters"> | ||
152 | The optional <tt>buffersize</tt> parameter | ||
153 | specifies the size of the largest datagram that will | ||
154 | ever be received by the UDP object. The default value is | ||
155 | 8192. | ||
156 | </p> | ||
157 | |||
137 | <p class="return"> | 158 | <p class="return"> |
138 | In case of success, a new unconnected UDP object | 159 | In case of success, a new unconnected UDP object |
139 | returned. In case of error, <b><tt>nil</tt></b> is returned, followed by | 160 | returned. In case of error, <b><tt>nil</tt></b> is returned, followed by |
@@ -238,9 +259,10 @@ specifies the maximum size of the datagram to be retrieved. If | |||
238 | there are more than <tt>size</tt> bytes available in the datagram, | 259 | there are more than <tt>size</tt> bytes available in the datagram, |
239 | the excess bytes are discarded. If there are less then | 260 | the excess bytes are discarded. If there are less then |
240 | <tt>size</tt> bytes available in the current datagram, the | 261 | <tt>size</tt> bytes available in the current datagram, the |
241 | available bytes are returned. If <tt>size</tt> is omitted, the | 262 | available bytes are returned. |
242 | maximum datagram size is used (which is currently limited by the | 263 | If <tt>size</tt> is omitted, the |
243 | implementation to 8192 bytes). | 264 | <tt>buffersize</tt> argument at creation time is used |
265 | (which defaults to 8192 bytes). | ||
244 | </p> | 266 | </p> |
245 | 267 | ||
246 | <p class="return"> | 268 | <p class="return"> |