Files
ghidra-cli/src/ipc/transport.rs
T
2026-02-04 14:26:33 -08:00

15 lines
414 B
Rust

//! Transport helpers for bridge TCP communication.
//!
//! The Java bridge uses newline-delimited JSON over TCP.
//! This module provides minimal transport utilities.
use std::net::TcpStream;
/// Check if a TCP port is reachable on localhost.
#[allow(dead_code)]
pub fn port_reachable(port: u16) -> bool {
TcpStream::connect(format!("127.0.0.1:{}", port))
.map(|_| true)
.unwrap_or(false)
}