geph4-client 4.99.13

Geph client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use binary_search::Direction;
use geph4client::dispatch;

fn main() -> anyhow::Result<()> {
    #[cfg(target_os = "android")]
    smolscale::permanently_single_threaded();
    let ((largest_low, _), _) = binary_search::binary_search((1, ()), (65536, ()), |lim| {
        if rlimit::utils::increase_nofile_limit(lim).unwrap_or_default() >= lim {
            Direction::Low(())
        } else {
            Direction::High(())
        }
    });
    let _ = rlimit::utils::increase_nofile_limit(largest_low);
    log::info!("** set fd limit to {} **", largest_low);

    dispatch()
}