From bce60be30fe8e9c1b0eb33128c23c93d7bca5303 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Wed, 27 May 2009 09:31:38 +0000 Subject: Decent makefiles! --- doc/socket.html | 56 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 18 deletions(-) (limited to 'doc/socket.html') diff --git a/doc/socket.html b/doc/socket.html index f096e4b..490ab50 100644 --- a/doc/socket.html +++ b/doc/socket.html @@ -24,8 +24,8 @@

-home · -download · +home · +download · installation · introduction · reference @@ -94,6 +94,24 @@ This constant is set to true if the library was compiled with debug support.

+ + +

+socket.gettime() +

+ +

+Returns the time in seconds, relative to the origin of the +universe. You should subtract the values returned by this function +to get meaningful values. +

+ +
+t = socket.gettime()
+-- do stuff
+print(socket.gettime() - t .. " seconds elapsed")
+
+

@@ -199,6 +217,15 @@ themselves, to simplify the test if a specific socket has changed status.

+

+Note: : select can monitor a limited number +of sockets, as defined by the constant socket._SETSIZE. This +number may be as high as 1024 or as low as 64 by default, +depending on the system. It is usually possible to change this +at compile time. Invoking select with a larger +number of sockets will raise an error. +

+

Important note: a known bug in WinSock causes select to fail on non-blocking TCP sockets. The function may return a socket as @@ -288,8 +315,8 @@ Freezes the program execution during a given amount of time.

-Time is the number of seconds to sleep for. -The function truncates time down to the nearest integer. +Time is the number of seconds to sleep for. If +time is negative, the function returns immediately.

@@ -324,24 +351,17 @@ side closes the connection. The function returns a source with the appropriate behavior.

- + -

-socket.gettime() +

+socket._SETSIZE

-Returns the time in seconds, relative to the origin of the -universe. You should subtract the values returned by this function -to get meaningful values. +The maximum number of sockets that the select function can handle.

-
-t = socket.gettime()
--- do stuff
-print(socket.gettime() - t .. " seconds elapsed")
-
-

@@ -386,8 +406,8 @@ This constant has a string describing the current LuaSocket version.


-home · -download · +home · +download · installation · introduction · reference -- cgit v1.2.3-55-g6feb