update nonblocking methods document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6c3879a612
commit
31328e55fe
@ -2286,7 +2286,10 @@ sock_connect(sock, addr)
|
||||
* socket.connect_nonblock( sockaddr )
|
||||
* rescue Errno::EINPROGRESS
|
||||
* IO.select(nil, [socket])
|
||||
* socket.connect_nonblock( sockaddr )
|
||||
* begin
|
||||
* socket.connect_nonblock( sockaddr )
|
||||
* rescue Errno::EISCONN
|
||||
* end
|
||||
* end
|
||||
* socket.write( "GET / HTTP/1.0\r\n\r\n" )
|
||||
* results = socket.read
|
||||
@ -2623,6 +2626,10 @@ sock_recvfrom(argc, argv, sock)
|
||||
* The first element of the results is the data received.
|
||||
* The second element contains protocol-specific information
|
||||
* on the sender.
|
||||
*
|
||||
* When recvfrom(2) returns 0, Socket#recvfrom_nonblock returns
|
||||
* an empty string as data.
|
||||
* The meaning depends on the socket: EOF on TCP, empty packet on UDP, etc.
|
||||
*
|
||||
* === Parameters
|
||||
* * +len+ - the number of bytes to receive from the socket
|
||||
@ -2745,7 +2752,7 @@ sock_accept(sock)
|
||||
* socket.listen( 5 )
|
||||
* begin
|
||||
* client_socket, client_sockaddr = socket.accept_nonblock
|
||||
* rescue Errno::EAGAIN
|
||||
* rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
|
||||
* IO.select([socket])
|
||||
* retry
|
||||
* end
|
||||
|
Loading…
x
Reference in New Issue
Block a user