summaryrefslogtreecommitdiff
path: root/src/client/main.rs
blob: fa2017dd32794d123fef411ec3e5ed8e6d92ab74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#![allow(incomplete_features, clippy::redundant_field_names)]
#![feature(associated_type_defaults, never_type, lazy_type_alias)]

use crate::client::Client;
use crate::connector::httpconnector::HTTPConnector;
use signal_hook::consts::signal::*;
use signal_hook::iterator::Signals;

pub(crate) mod client;
pub(crate) mod connector;
pub(crate) mod executor;

fn main() {
    _ = Signals::new([
        SIGHUP,
        SIGINT,
        SIGQUIT,
        SIGTRAP,
        SIGABRT,
        SIGPIPE,
        SIGALRM,
        SIGTERM,
        SIGUSR1,
        SIGUSR2,
        SIGCHLD,
        SIGCONT,
        SIGTSTP,
        SIGTTIN,
        SIGTTOU,
        SIGURG,
        SIGXCPU,
        SIGXFSZ,
        SIGVTALRM,
        SIGPROF,
        SIGWINCH,
        #[cfg(any(target_os = "linux", target_os = "android"))]
        SIGSYS,
    ]); // discard err

    let ip = "http://127.0.0.1:8080";
    let client = Client::new(HTTPConnector::new(ip, ip, "/").unwrap()).unwrap();
    client.enter_loop();
}