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?, #protocol, #sync, #sync=, #type
Methods inherited from Generic
#connected?, #dup, #nonblock, #nonblock=, #nonblock?, #read, #wait, wrap, wrap_blocking_method, wraps, #write
Instance Method Details
#accept ⇒ Object Also known as: sysaccept, accept_nonblock
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/async/io/unix_socket.rb', line 35 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 |