Server IP : 111.118.215.189 / Your IP : 216.73.216.153 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /proc/thread-self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Socket/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
U:RDoc::AnyMethod[iI"tcp:EFI"Socket::tcp;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"Ecreates a new socket object connected to host:port using TCP/IP.;To:RDoc::Markup::BlankLine o; ; [I"(If local_host:local_port is given, ;TI"the socket is bound to it.;T@o; ; [I"IThe optional last argument _opts_ is options represented by a hash. ;TI"'_opts_ may have following options:;T@o:RDoc::Markup::List: @type: LABEL:@items[o:RDoc::Markup::ListItem:@label[I":connect_timeout;T; [o; ; [I"$specify the timeout in seconds.;T@o; ; [I"?If a block is given, the block is called with the socket. ;TI")The value of the block is returned. ;TI"3The socket is closed when this method returns.;T@o; ; [I"2If no block is given, the socket is returned.;T@o:RDoc::Markup::Verbatim; [ I"1Socket.tcp("www.ruby-lang.org", 80) {|sock| ;TI"F sock.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" ;TI" sock.close_write ;TI" puts sock.read ;TI"};T:@format0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"�Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) {|socket| ... } Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) ;TI"socket;F[ I"K(host, port, local_host = nil, local_port = nil, connect_timeout: nil);T@/FI"Socket;TcRDoc::NormalClass00