shoes 0.2.0

A multi-protocol proxy server.
1
2
3
4
5
6
7
8
9
10
11
use std::net::{IpAddr, Ipv4Addr};
use shoes::address::NetLocation;

fn main() {
    let net_loc = NetLocation::from_ip_addr(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
    let yaml_str = serde_yaml::to_string(&net_loc).unwrap();
    println!("NetLocation serialized as: {}", yaml_str);
    
    let deserialized: NetLocation = serde_yaml::from_str(&yaml_str).unwrap();
    println!("Deserialized back: {}", deserialized);
}