summaryrefslogtreecommitdiff
path: root/src/server/mod.rs
blob: 01a686dfdbfa9c3699943d578d344a979d2875c0 (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
use std::vec::Vec;
use std::collections::HashMap;
use url::Url;

mod handler;
mod response;

pub struct Server {
    handlers: Vec<Box<dyn handler::Handler>>,
}

impl Server {
    pub fn new() -> Server {
        Server{handlers: Vec::<Box<dyn handler::Handler>>::new()}
    }
}

pub fn register(host: &str, server: Server) {
////    servers.insert(
////        host.to_string(),
////        server,
////    );
}

pub fn handle(url: &Url) -> Vec<u8> {
    return Vec::new();
}

//static mut servers : HashMap<String, Server> = HashMap::new();