25 lines
563 B
Rust
25 lines
563 B
Rust
mod options;
|
|
|
|
use crate::options::OPTIONS;
|
|
use common::io::read_string;
|
|
use common::request::Request;
|
|
use std::os::unix::net::UnixStream;
|
|
|
|
fn main() -> std::io::Result<()> {
|
|
let mut stream = UnixStream::connect(&OPTIONS.socket_name)?;
|
|
println!("Connected to server");
|
|
|
|
let request = Request::new(
|
|
&OPTIONS.username,
|
|
&OPTIONS.password,
|
|
"ignore-this",
|
|
"also-ignore-this",
|
|
);
|
|
|
|
request.write_to_stream(&mut stream)?;
|
|
let response = read_string(&mut stream)?;
|
|
println!("Response: {response}");
|
|
|
|
Ok(())
|
|
}
|