export function isIpv4Address(address) {
    const parts = address.trim().split('.');
    if (parts.length !== 4) {
        return false;
    }
    for (let i = 0; i < parts.length; i++) {
        const octet = parseInt(parts[i], 10);
        if (octet < 0 || octet > 255) {
            return false;
        }
    }
    return true;
}
export const addressFamilyMismatch = (remote, socket) => {
    return isIpv4Address(remote.address) ? socket.type !== 'udp4' : socket.type !== 'udp6';
};
//# sourceMappingURL=utils.js.map