aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDiego Nehab <diego.nehab@gmail.com>2015-10-05 11:47:51 +0800
committerDiego Nehab <diego.nehab@gmail.com>2015-10-05 11:47:51 +0800
commitfd729b32a8966291f007567f72f3dc0158bdab35 (patch)
tree46737842ba3f9a5aaa2325a76724f12fbc53353e /doc
parentd1ec29be7f982db75864155dd61a058902e1cae2 (diff)
downloadluasocket-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.html34
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">
45socket.<b>udp()</b> 45socket.<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>
62is used to connect the object. 62is used to connect the object.
63</p> 63</p>
64 64
65<p class="parameters">
66The optional <tt>buffersize</tt> parameter
67specifies the size of the largest datagram that will
68ever be received by the UDP object. The default value is
698192.
70</p>
71
65<p class="return"> 72<p class="return">
66In case of success, a new unconnected UDP object 73In case of success, a new unconnected UDP object
67returned. In case of error, <b><tt>nil</tt></b> is returned, followed by 74returned. 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">
88socket.<b>udp4()</b> 95socket.<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>
105is used to connect the object. 112is used to connect the object.
106</p> 113</p>
107 114
115<p class="parameters">
116The optional <tt>buffersize</tt> parameter
117specifies the size of the largest datagram that will
118ever be received by the UDP object. The default value is
1198192.
120</p>
121
108<p class="return"> 122<p class="return">
109In case of success, a new unconnected UDP object 123In case of success, a new unconnected UDP object
110returned. In case of error, <b><tt>nil</tt></b> is returned, followed by 124returned. 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">
117socket.<b>udp6()</b> 131socket.<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>
134is used to connect the object. 148is used to connect the object.
135</p> 149</p>
136 150
151<p class="parameters">
152The optional <tt>buffersize</tt> parameter
153specifies the size of the largest datagram that will
154ever be received by the UDP object. The default value is
1558192.
156</p>
157
137<p class="return"> 158<p class="return">
138In case of success, a new unconnected UDP object 159In case of success, a new unconnected UDP object
139returned. In case of error, <b><tt>nil</tt></b> is returned, followed by 160returned. 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
238there are more than <tt>size</tt> bytes available in the datagram, 259there are more than <tt>size</tt> bytes available in the datagram,
239the excess bytes are discarded. If there are less then 260the 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
241available bytes are returned. If <tt>size</tt> is omitted, the 262available bytes are returned.
242maximum datagram size is used (which is currently limited by the 263If <tt>size</tt> is omitted, the
243implementation 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">