diff options
Diffstat (limited to 'doc/socket.html')
-rw-r--r-- | doc/socket.html | 11 |
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> |
76 | socket.<b>connect(</b>address, port [, locaddr, locport]<b>)</b> | 76 | socket.<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> |
80 | This function is a shortcut that creates and returns a TCP client object | 80 | This function is a shortcut that creates and returns a TCP client object |
81 | connected to a remote <tt>host</tt> at a given <tt>port</tt>. Optionally, | 81 | connected to a remote <tt>address</tt> at a given <tt>port</tt>. Optionally, |
82 | the user can also specify the local address and port to bind | 82 | the 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 |
84 | to "<tt>inet</tt>" or "<tt>inet6</tt>". | ||
85 | Without specifying <tt>family</tt> to <tt>connect</tt>, whether a tcp or tcp6 | ||
86 | connection is created depends on your system configuration. Two variations | ||
87 | of 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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |