/* lib/terminal/utilities/getAddress - Extracts IP addresses from a provided socket. */ import ipResolve from "../server/transmission/ipResolve.js";
const getAddress = function terminal_utilities_getAddress(transmit) {
    const response = transmit.socket, socket = transmit.type === "ws" ? transmit.socket : response.socket;
    return {
        local: {
            address: ipResolve.parse(socket.localAddress),
            port: socket.localPort
        },
        remote: {
            address: ipResolve.parse(socket.remoteAddress),
            port: socket.remotePort
        }
    };
};
export default getAddress;
