rtcps 1.0.2

Rust TCP Scanner
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::sync::Arc;

use dashmap::DashMap;
use rtcps::{cli::PORT_RANGE, count_open_ports};

#[test]
fn test_port_count() {
    let hashmap = Arc::new(DashMap::new());

    for i in PORT_RANGE {
        hashmap.insert(i, true);
    }

    assert_eq!(count_open_ports(&hashmap), PORT_RANGE.max().unwrap())
}