mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
basicsocket.c: swap examples [ci skip]
* ext/socket/basicsocket.c (bsock_do_not_reverse_lookup), (bsock_do_not_reverse_lookup_set): [DOC] swap examples. the code setting the flag is for the setter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ee750a8a8b
commit
023835f475
1 changed files with 11 additions and 7 deletions
|
@ -569,11 +569,13 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
|
|||
*
|
||||
* Gets the do_not_reverse_lookup flag of _basicsocket_.
|
||||
*
|
||||
* BasicSocket.do_not_reverse_lookup = false
|
||||
* TCPSocket.open("www.ruby-lang.org", 80) {|sock|
|
||||
* p sock.do_not_reverse_lookup #=> false
|
||||
* p sock.peeraddr #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"]
|
||||
* sock.do_not_reverse_lookup = true
|
||||
* p sock.peeraddr #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
|
||||
* }
|
||||
* BasicSocket.do_not_reverse_lookup = true
|
||||
* TCPSocket.open("www.ruby-lang.org", 80) {|sock|
|
||||
* p sock.do_not_reverse_lookup #=> true
|
||||
* }
|
||||
*/
|
||||
static VALUE
|
||||
|
@ -591,10 +593,12 @@ bsock_do_not_reverse_lookup(VALUE sock)
|
|||
*
|
||||
* Sets the do_not_reverse_lookup flag of _basicsocket_.
|
||||
*
|
||||
* BasicSocket.do_not_reverse_lookup = false
|
||||
* p TCPSocket.new("127.0.0.1", 80).do_not_reverse_lookup #=> false
|
||||
* BasicSocket.do_not_reverse_lookup = true
|
||||
* p TCPSocket.new("127.0.0.1", 80).do_not_reverse_lookup #=> true
|
||||
* TCPSocket.open("www.ruby-lang.org", 80) {|sock|
|
||||
* p sock.do_not_reverse_lookup #=> true
|
||||
* p sock.peeraddr #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
|
||||
* sock.do_not_reverse_lookup = false
|
||||
* p sock.peeraddr #=> ["AF_INET", 80, "carbon.ruby-lang.org", "54.163.249.195"]
|
||||
* }
|
||||
*
|
||||
*/
|
||||
static VALUE
|
||||
|
|
Loading…
Reference in a new issue