| Crates.io | simpletcp |
| lib.rs | simpletcp |
| version | 1.2.1 |
| created_at | 2020-08-21 16:03:40.276584+00 |
| updated_at | 2020-09-15 20:41:30.378388+00 |
| description | Crate for simple and secure tcp communication |
| homepage | |
| repository | https://github.com/ondralukes/simpletcp |
| max_upload_size | |
| id | 279254 |
| size | 83,041 |
Crate for simple and secure TCP communication
All traffic is encrypted with 256-bit AES-CBC
//Connect
let mut client = TcpStream::connect("127.0.0.1:4234").unwrap();
//Wait until connection is initialized
client.wait_until_ready().unwrap();
//Build message
let mut msg = Message::new();
msg.write_f64(1.23455);
msg.write_buffer(&[3, 1, 4, 56]);
//Send message
client.write(&msg).unwrap();
See examples