pub fn format_tcp_endpoint(endpoint: &TcpEndpoint) -> String
Formats a TCP endpoint with IPv6 bracket handling.