corn 0.2.0

corn is a socket server free to chat & a web server display files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::thread;
use corn::start_chat_server;
use corn::start_web_server;

fn main() {
    println!("Hello, world!");
    thread::spawn(||{
        start_chat_server();
    });

    // start a new thread
    let handle = thread::spawn(||{
        start_web_server();
    });
    // Waiting for the child thread to complete 
    // (If not set, the main thread may finish execution before the child thread even starts, causing the child thread's logic to never execute)
    handle.join().unwrap();
}