%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/cpanel/ea-ruby24/root/usr/share/ri/system/TCPServer/
Upload File :
Create Path :
Current File : //opt/cpanel/ea-ruby24/root/usr/share/ri/system/TCPServer/accept_nonblock-i.ri

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::BlankLineS: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

Zerion Mini Shell 1.0