Class: Async::IO::UNIXServer
- Inherits:
-
UNIXSocket
- Object
- Wrapper
- Generic
- BasicSocket
- UNIXSocket
- Async::IO::UNIXServer
- Defined in:
- lib/async/io/unix_socket.rb
Constant Summary
Constants inherited from Generic
Instance Attribute Summary
Attributes inherited from Generic
Instance Method Summary collapse
- #accept ⇒ Object (also: #sysaccept, #accept_nonblock)
Methods included from Peer
#connected?, #eof, #eof?, #protocol, #sync, #sync=, #type
Methods inherited from Generic
#<<, #connected?, #dup, #nonblock, #nonblock=, #nonblock?, #read, #readable?, #sysread, #syswrite, #wait, wrap, wrap_blocking_method, wraps, #write
Instance Method Details
#accept ⇒ Object Also known as: sysaccept, accept_nonblock
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/async/io/unix_socket.rb', line 20 def accept peer = async_send(:accept_nonblock) wrapper = UNIXSocket.new(peer, self.reactor) return wrapper unless block_given? begin yield wrapper ensure wrapper.close end end |