| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/TCPServer/ |
Upload File : |
U:RDoc::AnyMethod[iI"accept_nonblock:EFI"TCPServer#accept_nonblock;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I":Accepts an incoming connection using accept(2) after ;TI";O_NONBLOCK is set for the underlying file descriptor. ;TI"BIt returns an accepted TCPSocket for the incoming connection.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Example;To:RDoc::Markup::Verbatim; [I"require 'socket' ;TI" serv = TCPServer.new(2202) ;TI"%begin # emulate blocking accept ;TI"# sock = serv.accept_nonblock ;TI"+rescue IO::WaitReadable, Errno::EINTR ;TI" IO.select([serv]) ;TI" retry ;TI" end ;TI"## sock is an accepted socket. ;T:@format0o; ; [I"NRefer to Socket#accept for the exceptions that may be thrown if the call ;TI"(to TCPServer#accept_nonblock fails.;T@o; ; [I"WTCPServer#accept_nonblock may raise any error corresponding to accept(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [I"`If the exception is Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, ;TI")it is extended by IO::WaitReadable. ;TI"[So IO::WaitReadable can be used to rescue the exceptions for retrying accept_nonblock.;T@o; ; [I"OBy specifying a keyword argument _exception_ to +false+, you can indicate ;TI"Nthat accept_nonblock should not raise an IO::WaitReadable exception, but ;TI"0return the symbol +:wait_readable+ instead.;T@S;; i;I"See;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"TCPServer#accept;To;;0; [o; ; [I"Socket#accept;T: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"7tcpserver.accept_nonblock([options]) => tcpsocket ;T0[ I"(exception: true);T@>FI"TCPServer;TcRDoc::NormalClass00