Class: ClaudeAgentSDK::Transport
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::Transport
- Defined in:
- lib/claude_agent_sdk/transport.rb
Overview
Abstract transport for Claude communication
WARNING: This internal API is exposed for custom transport implementations (e.g., remote Claude Code connections). The Claude Code team may change or remove this abstract class in any future release. Custom implementations must be updated to match interface changes.
Direct Known Subclasses
Instance Method Summary collapse
-
#close ⇒ Object
Close the transport connection and clean up resources.
-
#connect ⇒ Object
Connect the transport and prepare for communication.
-
#end_input ⇒ Object
End the input stream (close stdin for process transports).
-
#read_messages ⇒ Enumerator
Read and parse messages from the transport.
-
#ready? ⇒ Boolean
Check if transport is ready for communication.
-
#write(data) ⇒ Object
Write raw data to the transport.
Instance Method Details
#close ⇒ Object
Close the transport connection and clean up resources
29 30 31 |
# File 'lib/claude_agent_sdk/transport.rb', line 29 def close raise NotImplementedError, 'Subclasses must implement #close' end |
#connect ⇒ Object
Connect the transport and prepare for communication
12 13 14 |
# File 'lib/claude_agent_sdk/transport.rb', line 12 def connect raise NotImplementedError, 'Subclasses must implement #connect' end |
#end_input ⇒ Object
End the input stream (close stdin for process transports)
40 41 42 |
# File 'lib/claude_agent_sdk/transport.rb', line 40 def end_input raise NotImplementedError, 'Subclasses must implement #end_input' end |
#read_messages ⇒ Enumerator
Read and parse messages from the transport
24 25 26 |
# File 'lib/claude_agent_sdk/transport.rb', line 24 def raise NotImplementedError, 'Subclasses must implement #read_messages' end |
#ready? ⇒ Boolean
Check if transport is ready for communication
35 36 37 |
# File 'lib/claude_agent_sdk/transport.rb', line 35 def ready? raise NotImplementedError, 'Subclasses must implement #ready?' end |
#write(data) ⇒ Object
Write raw data to the transport
18 19 20 |
# File 'lib/claude_agent_sdk/transport.rb', line 18 def write(data) raise NotImplementedError, 'Subclasses must implement #write' end |