Class: Async::IO::SocketEndpoint
- Defined in:
- lib/async/io/endpoint.rb
Overview
This class doesn’t exert ownership over the specified socket.
Instance Attribute Summary
Attributes inherited from Endpoint
Instance Method Summary collapse
- #address ⇒ Object
- #bind {|Socket.new(specification, **options)| ... } ⇒ Object
- #connect {|Async::IO.try_convert(specification)| ... } ⇒ Object
Methods inherited from Endpoint
#accept, each, #initialize, parse, #socket_domain, #socket_protocol, #socket_type, ssl, tcp, #to_sockaddr, udp, unix
Constructor Details
This class inherits a constructor from Async::IO::Endpoint
Instance Method Details
#address ⇒ Object
132 133 134 |
# File 'lib/async/io/endpoint.rb', line 132 def address specification.local_address end |
#bind {|Socket.new(specification, **options)| ... } ⇒ Object
136 137 138 |
# File 'lib/async/io/endpoint.rb', line 136 def bind(&block) yield Socket.new(specification, **) end |
#connect {|Async::IO.try_convert(specification)| ... } ⇒ Object
140 141 142 |
# File 'lib/async/io/endpoint.rb', line 140 def connect(&block) yield Async::IO.try_convert(specification) end |