From 156669c28bc62bfddbd5625c4bb4c1f8da94802b Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Thu, 10 May 2012 14:14:22 -0700 Subject: 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. --- doc/reference.html | 2 ++ doc/socket.html | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'doc') 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">
bind, connect, +connect4, +connect6, _DEBUG, dns, gettime, 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 true.

-socket.connect(address, port [, locaddr, locport]) +socket.connect[46](address, port [, locaddr] [, locport] [, family])

This function is a shortcut that creates and returns a TCP client object -connected to a remote host at a given port. Optionally, +connected to a remote address at a given port. Optionally, the user can also specify the local address and port to bind -(locaddr and locport). +(locaddr and locport), or restrict the socket family +to "inet" or "inet6". +Without specifying family to connect, whether a tcp or tcp6 +connection is created depends on your system configuration. Two variations +of connect are defined as simple helper functions that restrict the +family, socket.connect4 and socket.connect6.

-- cgit v1.2.3-55-g6feb