Module: Hop
- Defined in:
- lib/hop.rb,
lib/hop/ffi.rb,
lib/hop/dev_tls.rb,
lib/hop/endpoint.rb,
lib/hop/discovery.rb,
lib/hop/tcp_bearer.rb,
lib/hop/wss_bearer.rb
Defined Under Namespace
Modules: DevTls, Discovery, FFI, TcpBearer, WssBearer Classes: Endpoint, Request
Class Method Summary collapse
-
.connect_in_process(a, b, la: 11, lb: 22) ⇒ Object
Wire two endpoints directly (in-process bearer), no sockets.
Class Method Details
.connect_in_process(a, b, la: 11, lb: 22) ⇒ Object
Wire two endpoints directly (in-process bearer), no sockets. Proves the ergonomics end to end.
10 11 12 13 |
# File 'lib/hop.rb', line 10 def self.connect_in_process(a, b, la: 11, lb: 22) a.register_link(la, :dialer, ->(buf) { b.deliver(lb, buf) }) b.register_link(lb, :acceptor, ->(buf) { a.deliver(la, buf) }) end |