Class: Arcp::Transport::Base
- Inherits:
-
Object
- Object
- Arcp::Transport::Base
show all
- Defined in:
- lib/arcp/transport/base.rb
Overview
Abstract transport interface. Implementations carry frames, not message types — decoding is ‘Arcp::Envelope.from_h`.
‘#send` accepts an `Arcp::Envelope` and serializes it. `#receive` suspends the calling fiber until an envelope arrives, then returns it (or nil on clean close).
Instance Method Summary
collapse
Instance Method Details
#close(reason: nil) ⇒ Object
22
23
24
|
# File 'lib/arcp/transport/base.rb', line 22
def close(reason: nil)
raise NotImplementedError
end
|
#closed? ⇒ Boolean
26
|
# File 'lib/arcp/transport/base.rb', line 26
def closed? = false
|
#receive ⇒ Object
18
19
20
|
# File 'lib/arcp/transport/base.rb', line 18
def receive
raise NotImplementedError
end
|
#send(envelope) ⇒ Object
14
15
16
|
# File 'lib/arcp/transport/base.rb', line 14
def send(envelope)
raise NotImplementedError
end
|