socket.rb: [DOC] fix nonblock methods
* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix exception class and symbol. * ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto. * ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the method name. * ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d5eef0301a
commit
53b4bf3134
@ -363,8 +363,8 @@ class BasicSocket < IO
|
|||||||
# So IO::WaitReadable can be used to rescue the exceptions for retrying recv_nonblock.
|
# So IO::WaitReadable can be used to rescue the exceptions for retrying recv_nonblock.
|
||||||
#
|
#
|
||||||
# By specifying `exception: false`, the options hash allows you to indicate
|
# By specifying `exception: false`, the options hash allows you to indicate
|
||||||
# that recv_nonblock should not raise an IO::WaitWritable exception, but
|
# that recv_nonblock should not raise an IO::WaitReadable exception, but
|
||||||
# return the symbol :wait_writable instead. At EOF, it will return nil instead
|
# return the symbol :wait_readable instead. At EOF, it will return nil instead
|
||||||
# of raising EOFError.
|
# of raising EOFError.
|
||||||
#
|
#
|
||||||
# === See
|
# === See
|
||||||
@ -438,8 +438,8 @@ class BasicSocket < IO
|
|||||||
# and it doesn't retry the system call.
|
# and it doesn't retry the system call.
|
||||||
#
|
#
|
||||||
# By specifying `exception: false`, the _opts_ hash allows you to indicate
|
# By specifying `exception: false`, the _opts_ hash allows you to indicate
|
||||||
# that recvmsg_nonblock should not raise an IO::WaitWritable exception, but
|
# that recvmsg_nonblock should not raise an IO::WaitReadable exception, but
|
||||||
# return the symbol :wait_writable instead. At EOF, it will return nil instead
|
# return the symbol :wait_readable instead. At EOF, it will return nil instead
|
||||||
# of raising EOFError.
|
# of raising EOFError.
|
||||||
def recvmsg_nonblock(dlen = nil, flags = 0, clen = nil,
|
def recvmsg_nonblock(dlen = nil, flags = 0, clen = nil,
|
||||||
scm_rights: false, exception: true)
|
scm_rights: false, exception: true)
|
||||||
@ -516,7 +516,7 @@ class Socket < BasicSocket
|
|||||||
# recvfrom_nonblock.
|
# recvfrom_nonblock.
|
||||||
#
|
#
|
||||||
# By specifying `exception: false`, the options hash allows you to indicate
|
# By specifying `exception: false`, the options hash allows you to indicate
|
||||||
# that accept_nonblock should not raise an IO::WaitReadable exception, but
|
# that recvfrom_nonblock should not raise an IO::WaitReadable exception, but
|
||||||
# return the symbol :wait_readable instead. At EOF, it will return nil instead
|
# return the symbol :wait_readable instead. At EOF, it will return nil instead
|
||||||
# of raising EOFError.
|
# of raising EOFError.
|
||||||
#
|
#
|
||||||
@ -1253,8 +1253,8 @@ class UDPSocket < IPSocket
|
|||||||
# So IO::WaitReadable can be used to rescue the exceptions for retrying recvfrom_nonblock.
|
# So IO::WaitReadable can be used to rescue the exceptions for retrying recvfrom_nonblock.
|
||||||
#
|
#
|
||||||
# By specifying `exception: false`, the options hash allows you to indicate
|
# By specifying `exception: false`, the options hash allows you to indicate
|
||||||
# that recvmsg_nonblock should not raise an IO::WaitWritable exception, but
|
# that recvfrom_nonblock should not raise an IO::WaitReadable exception, but
|
||||||
# return the symbol :wait_writable instead. At EOF, it will return nil instead
|
# return the symbol :wait_readable instead. At EOF, it will return nil instead
|
||||||
# of raising EOFError.
|
# of raising EOFError.
|
||||||
#
|
#
|
||||||
# === See
|
# === See
|
||||||
|
Loading…
x
Reference in New Issue
Block a user