aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2012-05-10 14:14:22 -0700
committerSam Roberts <vieuxtech@gmail.com>2012-05-10 14:14:22 -0700
commit156669c28bc62bfddbd5625c4bb4c1f8da94802b (patch)
tree074ea57dd044a9bed306464af8c9f141bdf0ca19 /doc
parent3d3e69c6e43f6431969e072e78df43b0ab73c48d (diff)
downloadluasocket-156669c28bc62bfddbd5625c4bb4c1f8da94802b.tar.gz
luasocket-156669c28bc62bfddbd5625c4bb4c1f8da94802b.tar.bz2
luasocket-156669c28bc62bfddbd5625c4bb4c1f8da94802b.zip
socket.connect now implemented in the C core
This avoid socket.lua duplicating the iteration over the results of getaddrinfo(). Some problems with the C implementation not initializing sockets or the luasocket family have also been fixed, and error reporting made more robust.
Diffstat (limited to 'doc')
-rw-r--r--doc/reference.html2
-rw-r--r--doc/socket.html11
2 files changed, 10 insertions, 3 deletions
diff --git a/doc/reference.html b/doc/reference.html
index f069d47..e9bb5eb 100644
--- a/doc/reference.html
+++ b/doc/reference.html
@@ -145,6 +145,8 @@ Support, Manual">
145<blockquote> 145<blockquote>
146<a href="socket.html#bind">bind</a>, 146<a href="socket.html#bind">bind</a>,
147<a href="socket.html#connect">connect</a>, 147<a href="socket.html#connect">connect</a>,
148<a href="socket.html#connect">connect4</a>,
149<a href="socket.html#connect">connect6</a>,
148<a href="socket.html#debug">_DEBUG</a>, 150<a href="socket.html#debug">_DEBUG</a>,
149<a href="dns.html#dns">dns</a>, 151<a href="dns.html#dns">dns</a>,
150<a href="socket.html#gettime">gettime</a>, 152<a href="socket.html#gettime">gettime</a>,
diff --git a/doc/socket.html b/doc/socket.html
index dcf8b61..b9303cb 100644
--- a/doc/socket.html
+++ b/doc/socket.html
@@ -73,14 +73,19 @@ set to <tt><b>true</b></tt>.
73<!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 73<!-- connect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
74 74
75<p class=name id=connect> 75<p class=name id=connect>
76socket.<b>connect(</b>address, port [, locaddr, locport]<b>)</b> 76socket.<b>connect[46](</b>address, port [, locaddr] [, locport] [, family]<b>)</b>
77</p> 77</p>
78 78
79<p class=description> 79<p class=description>
80This function is a shortcut that creates and returns a TCP client object 80This function is a shortcut that creates and returns a TCP client object
81connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally, 81connected to a remote <tt>address</tt> at a given <tt>port</tt>. Optionally,
82the user can also specify the local address and port to bind 82the user can also specify the local address and port to bind
83(<tt>locaddr</tt> and <tt>locport</tt>). 83(<tt>locaddr</tt> and <tt>locport</tt>), or restrict the socket family
84to "<tt>inet</tt>" or "<tt>inet6</tt>".
85Without specifying <tt>family</tt> to <tt>connect</tt>, whether a tcp or tcp6
86connection is created depends on your system configuration. Two variations
87of connect are defined as simple helper functions that restrict the
88<tt>family</tt>, <tt>socket.connect4</tt> and <tt>socket.connect6</tt>.
84</p> 89</p>
85 90
86<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> 91<!-- debug ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->