Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
UNIXServer
/
//opt/alt/ruby21/share/ri/2.1.0/system/UNIXServer/accept_nonblock-i.ri
U:RDoc::AnyMethod[iI"accept_nonblock:ETI"UNIXServer#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"CIt returns an accepted UNIXSocket for the incoming connection.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Example;To:RDoc::Markup::Verbatim; [I"require 'socket' ;TI"(serv = UNIXServer.new("/tmp/sock") ;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 UNIXServer#accept_nonblock fails.;T@o; ; [I"XUNIXServer#accept_nonblock may raise any error corresponding to accept(2) failure, ;TI""including Errno::EWOULDBLOCK.;T@o; ; [I"aIf the exception is Errno::EWOULDBLOCK, Errno::AGAIN, Errno::ECONNABORTED or 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@S;; i;I"See;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"UNIXServer#accept;To;;0; [o; ; [I"Socket#accept;T: @fileI"ext/socket/unixserver.c;T:0@omit_headings_from_table_of_contents_below0I".unixserver.accept_nonblock => unixsocket ;T0[ I"();T@9FI"UNIXServer;TcRDoc::NormalClass00