Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

making a web server in rust

use std::net::TcpListener;

fn main() {
    let listener = TcpListener::bind("127.0.0.1:7878").unwrap();

    for stream in listener.incoming() {
        let stream = stream.unwrap();

        println!("Connection established!");
    }
}
Source by doc.rust-lang.org #
 
PREVIOUS NEXT
Tagged: #making #web #server #rust
ADD COMMENT
Topic
Name
4+2 =