diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..705ce5b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +*.so +*.so.* diff --git a/doc/reference.html b/doc/reference.html index 31f6ecf..8da3956 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -42,9 +42,9 @@ Support, Manual">
DNS (in socket)
-toip, +gethostname, tohostname, -gethostname. +toip.
@@ -108,9 +108,9 @@ Support, Manual"> MIME
high-level: -normalize, decode, encode, +normalize, stuff, wrap.
@@ -120,10 +120,10 @@ Support, Manual"> dot, eol, qp, -wrp, -qpwrp. +qpwrp, unb64, unqp, +wrp. @@ -142,6 +142,8 @@ Support, Manual">
Socket
+bind, +connect, _DEBUG, dns, gettime, @@ -169,11 +171,16 @@ Support, Manual"> bind, close, connect, +dirty, +getfd, +getoption, getpeername, getsockname, getstats, +listen, receive, send, +setfd, setoption, setstats, settimeout, diff --git a/doc/socket.html b/doc/socket.html index 490ab50..2267b4a 100644 --- a/doc/socket.html +++ b/doc/socket.html @@ -244,6 +244,10 @@ method or accept might block forever. it to select, it will be ignored.

+

+Using select with non-socket objects: Any object that implements getfd and dirty can be used with select, allowing objects from other libraries to be used within a socket.select driven loop. +

+

diff --git a/doc/tcp.html b/doc/tcp.html index d1d2154..f59d7ac 100644 --- a/doc/tcp.html +++ b/doc/tcp.html @@ -397,7 +397,40 @@ disables the Nagle's algorithm for the connection.

-The method returns 1 in case of success, or nil otherwise. +The method returns 1 in case of success, or nil +followed by an error message otherwise. +

+ +

+Note: The descriptions above come from the man pages. +

+ + + +

+client:getoption(option)
+server:getoption(option) +

+ +

+Gets options for the TCP object. +See setoption for description of the +option names and values. +

+ +

+Option is a string with the option name. +

+ +

+The method returns the option value in case of success, or +nil followed by an error message otherwise.

@@ -508,6 +541,66 @@ This is the default mode; This function returns 1.

+ + +

+master:dirty()
+client:dirty()
+server:dirty() +

+ +

+Check the read buffer status. +

+ +

+Returns true if there is any data in the read buffer, false otherwise. +

+ +

+Note: This is an internal method, any use is unlikely to be portable. +

+ + + +

+master:getfd()
+client:getfd()
+server:getfd() +

+ +

+Returns the underling socket descriptor or handle associated to the object. +

+ +

+The descriptor or handle. In case the object has been closed, the return will be -1. +

+ +

+Note: This is an internal method, any use is unlikely to be portable. +

+ + + +

+master:setfd(fd)
+client:setfd(fd)
+server:setfd(fd) +

+ +

+Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made. +

+ +

+No return value. +

+ +

+Note: This is an internal method, any use is unlikely to be portable. +

+