Module: BSV::Auth::Transport
- Included in:
- SimplifiedFetchTransport
- Defined in:
- lib/bsv/auth/transport.rb
Overview
Duck-typed interface for BRC-31 message transport.
Concrete transports (HTTP, WebSocket, in-process, etc.) must implement both methods. Include this module to get the default NotImplementedError stubs — override in your implementation class.
Instance Method Summary collapse
-
#on_data {|message| ... } ⇒ void
Registers a callback to be invoked when a message arrives.
-
#send(_message) ⇒ void
Sends a message to the remote peer.
Instance Method Details
#on_data {|message| ... } ⇒ void
This method returns an undefined value.
Registers a callback to be invoked when a message arrives.
40 41 42 |
# File 'lib/bsv/auth/transport.rb', line 40 def on_data(&_block) raise NotImplementedError, "#{self.class}#on_data not implemented" end |
#send(_message) ⇒ void
This method returns an undefined value.
Sends a message to the remote peer.
32 33 34 |
# File 'lib/bsv/auth/transport.rb', line 32 def send() raise NotImplementedError, "#{self.class}#send not implemented" end |