aboutsummaryrefslogtreecommitdiff
path: root/src/bin/quassel-client.rs
blob: 9d25088941753ef2b69226fc1baea87c08a01792 (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
use failure::Error;

extern crate libquassel;
use libquassel::client;

extern crate tokio;
extern crate pretty_env_logger;

#[tokio::main]
async fn main() -> Result<(), Error> {
    pretty_env_logger::init();

//    let mut client = client::Client::<tokio::net::TcpStream>::connect(
//        "cocaine.farm",
//        4242,
//        true,
//    ).await.unwrap();

    let mut client = client::Client::<tokio_tls::TlsStream<tokio::net::TcpStream>>::connect_tls(
        "cocaine.farm",
        4242,
        true,
    ).await.unwrap();

    client.run().await;
//    client.login("audron", "audron", client_init);

    Ok(())
} // the stream is closed here