aboutsummaryrefslogtreecommitdiff
path: root/doc/socket.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-15 06:24:00 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-15 06:24:00 +0000
commit58096449c6044b7aade5cd41cfd71c6bec1d273d (patch)
tree1814ffebe89c4c2556d84f97f66db37a7e8b4554 /doc/socket.html
parent9ed7f955e5fc69af9bf1794fa2c8cd227981ba24 (diff)
downloadluasocket-58096449c6044b7aade5cd41cfd71c6bec1d273d.tar.gz
luasocket-58096449c6044b7aade5cd41cfd71c6bec1d273d.tar.bz2
luasocket-58096449c6044b7aade5cd41cfd71c6bec1d273d.zip
Manual is almost done. HTTP is missing.
Implemented new distribution scheme. Select is now purely C. HTTP reimplemented seems faster dunno why. LTN12 functions that coroutines fail gracefully.
Diffstat (limited to 'doc/socket.html')
-rw-r--r--doc/socket.html25
1 files changed, 11 insertions, 14 deletions
diff --git a/doc/socket.html b/doc/socket.html
index bde882b..eccc676 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -36,16 +36,13 @@
36<h2 id=socket>The socket namespace</h2> 36<h2 id=socket>The socket namespace</h2>
37 37
38<p> 38<p>
39The <tt>socket</tt> namespace contains the namespace tables for all 39The <tt>socket</tt> namespace contains the core functionality of LuaSocket.
40LuaSocket modules as well as function that didn't belong in any specific
41module, functions that are so commonly used that deserve a shortcut and a
42few constants.
43</p> 40</p>
44 41
45<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 42<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
46 43
47<p class=name id=debug> 44<p class=name id=debug>
48socket.<b>debug</b> 45socket.<b>DEBUG</b>
49</p> 46</p>
50 47
51<p class=description> 48<p class=description>
@@ -57,7 +54,7 @@ with debug support.
57<!-- protect +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 54<!-- protect +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
58 55
59<p class=name id=protect> 56<p class=name id=protect>
60socket.<b>protect(</b>function<b>)</b> 57socket.<b>protect(</b>func<b>)</b>
61</p> 58</p>
62 59
63<p class=description> 60<p class=description>
@@ -65,12 +62,12 @@ Converts a function that throws exceptions into a safe function.
65</p> 62</p>
66 63
67<p class=parameters> 64<p class=parameters>
68<tt>Function</tt> is a function that calls 65<tt>Funct</tt> is a function that calls
69<a href=#try><tt>try</tt></a> to throw exceptions. 66<a href=#try><tt>try</tt></a> to throw exceptions.
70</p> 67</p>
71 68
72<p class=return> 69<p class=return>
73The function an equivalent function that instead of throwing exceptoins, 70Returns an equivalent function that instead of throwing exceptions,
74returns <tt><b>nil</b></tt> followed by an error message. 71returns <tt><b>nil</b></tt> followed by an error message.
75</p> 72</p>
76 73
@@ -103,16 +100,16 @@ simplify the test if a specific socket has changed status.
103</p> 100</p>
104 101
105<p class=note> 102<p class=note>
106<b>Important Note</b>: a known bug in WinSock causes <tt>select</tt> to fail 103<b>Important note</b>: a known bug in WinSock causes <tt>select</tt> to fail
107on non-blocking TCP sockets. The function may return a socket as 104on non-blocking TCP sockets. The function may return a socket as
108writable even though the socket is <em>not</em> ready for sending. 105writable even though the socket is <em>not</em> ready for sending.
109</p> 106</p>
110 107
111<p class=note> 108<p class=note>
112<b>Important note</b>: calling select with a server socket in the receive 109<b>Another important note</b>: calling select with a server socket in the receive
113parameter before a call to accept does <em>not</em> guarantee 110parameter before a call to accept does <em>not</em> guarantee
114<a href=tcp.html#accept><tt>accept</tt></a> will return immediately. 111<a href=tcp.html#accept><tt>accept</tt></a> will return immediately.
115Use the <a href=tcp.html#timeout><tt>timeout</tt></a> 112Use the <a href=tcp.html#settimeout><tt>settimeout</tt></a>
116method or <tt>accept</tt> might block forever. 113method or <tt>accept</tt> might block forever.
117</p> 114</p>
118 115
@@ -131,7 +128,7 @@ socket.<b>sink(</b>mode, socket<b>)</b>
131 128
132<p class=description> 129<p class=description>
133Creates an 130Creates an
134<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN012</a> 131<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
135sink from a stream socket object. 132sink from a stream socket object.
136</p> 133</p>
137 134
@@ -163,7 +160,7 @@ socket.<b>source(</b>mode, socket [, length]<b>)</b>
163 160
164<p class=description> 161<p class=description>
165Creates an 162Creates an
166<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN012</a> 163<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
167source from a stream socket object. 164source from a stream socket object.
168</p> 165</p>
169 166
@@ -217,7 +214,7 @@ c = socket.try(socket.connect("localhost", 80))
217<!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 214<!-- version ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
218 215
219<p class=name id=version> 216<p class=name id=version>
220socket.<b>version</b> 217socket.<b>VERSION</b>
221</p> 218</p>
222 219
223<p class=description> 220<p class=description>