class

Spacetime::MockTransport

Inherits Spacetime::Transport < Reference < Object

Deterministic in-memory mock transport for testing Spacetime::Client without a running server.

Instance methods

close
Source
connect
Source
connected?
Source
receive_json_message(json_str : String) : Nil

Simulates receiving a SATS-JSON text message from the server.

Source
receive_server_message(msg : Protocol::ServerMessage, compression : Protocol::Compression = Protocol::Compression::None) : Nil

Simulates receiving a Protocol::ServerMessage from the server over the binary BSATN protocol.

Source
send_binary(bytes : Bytes) : Nil
Source
send_text(text : String) : Nil
Source
sent_binary_frames
Source
sent_messages
Source
sent_text_frames
Source