diff --git a/doc/socket.html b/doc/socket.html new file mode 100644 index 0000000..9372648 --- /dev/null +++ b/doc/socket.html @@ -0,0 +1,135 @@ + + + +
++The socket namespace contains the namespace tables for all +LuaSocket modules as well as function that didn't belong in any specific +module, functions that are so commonly used that deserve a shortcut and a +few constants. +
+ + + ++socket.debug +
+ ++This constant is set to true if the library was compiled +with debug support. +
+ + + + ++socket.protect(function) +
+ ++Converts a function that throws exceptions into a safe function. +
+ ++Function is a function that calls +try to throw exceptions. +
+ ++The function an equivalent function that instead of throwing exceptoins, +returns nil followed by an error message. +
+ + + ++socket.try(ret1, ret2 ... retN) +
+ ++Throws an exception in case of error. +
+ ++Ret1, ret2 ... retN can be arbitrary +arguments, but are usually the return values of a function call that +nested with the call to try. +
+ ++The function returns ret1, ret2 ... retN if +ret1 is not nil. Otherwise, calls error +passing ret2. +
+ ++-- connects or throws an exception with the appropriate error message +c = socket.try(socket.connect("localhost", 80)) ++ + + +
+socket.version +
+ ++This constant has a string describing the current LuaSocket version. +
+ + + + + + +