class Lapis::Multiplayer::Spy

Overview

Wireshark-style packet inspector and network condition simulator

Defined in:

libgodot/multiplayer/harness.cr

Instance Method Summary

Instance Method Detail

def assert_max_bandwidth(max_kb_per_sec : Float64) : Nil #

def assert_rpc_sent(from : Int32, to : Int32, method : String | Symbol) : Nil #

def bandwidth_kb_per_sec : Float64 #

def capture_r2_forensics!(reason : String, fault_address : UInt64 = 0_u64) : Lapis::Debugger::CrashReport | Nil #

Captures a radare2 forensic memory snapshot when an anomaly or assertion failure occurs


def clear : Void #

def disable_r2_pipeline! : Nil #

def enable_r2_pipeline! : Nil #

def filter(&block : PacketInfo -> Bool) : Array(PacketInfo) #

def forensics_snapshots : Array(Lapis::Debugger::CrashReport) #

def latency_ms : Float64 #

def latency_ms=(latency_ms : Float64) #

def on_anomaly : Proc(PacketInfo, String, Nil) | Nil #

def on_anomaly=(on_anomaly : Proc(PacketInfo, String, Nil) | Nil) #

def packet_loss : Float64 #

def packet_loss=(packet_loss : Float64) #

def packets : Array(PacketInfo) #

def r2_pipeline_enabled=(r2_pipeline_enabled : Bool) #

def r2_pipeline_enabled? : Bool #

def record(sender_id : Int32, receiver_id : Int32, method_name : String | Symbol, channel : Int32 = 0, transfer_mode : String = "Reliable", payload_bytes : Int32 = 32) : PacketInfo #

def start_time : ::Time::Instant #

def total_bytes : Int64 #