Skip to content

Commit

Permalink
Add commented out example code to net.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Oct 23, 2023
1 parent f8042f6 commit 6af52c2
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion vm/src/sys/net.rs
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
use crate::vm::{VM, Value};
use std::net::{TcpListener, TcpStream};
use crate::vm::{VM, Value};





/*
fn handle_client(stream: TcpStream) {
// ...
stream.write(&[1])?;
stream.read(&mut [0; 128])?;
//stream.shutdown(Shutdown::Both).expect("shutdown call failed");
}
fn main() -> std::io::Result<()> {
let listener = TcpListener::bind("127.0.0.1:80")?;
// accept connections and process them serially
for stream in listener.incoming() {
handle_client(stream?);
}
Ok(())
}
*/

0 comments on commit 6af52c2

Please sign in to comment.