aboutsummaryrefslogtreecommitdiff
path: root/doc/socket.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/socket.html')
-rw-r--r--doc/socket.html11
1 files changed, 8 insertions, 3 deletions
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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->