2024-11-02 15:58:35 -07:00
|
|
|
mod options;
|
|
|
|
|
|
|
|
|
|
use crate::options::OPTIONS;
|
2024-11-03 11:44:03 -08:00
|
|
|
use common::io::read_string;
|
|
|
|
|
use common::request::Request;
|
2024-11-02 15:58:35 -07:00
|
|
|
use std::os::unix::net::UnixStream;
|
|
|
|
|
|
|
|
|
|
fn main() -> std::io::Result<()> {
|
|
|
|
|
let mut stream = UnixStream::connect(&OPTIONS.socket_name)?;
|
|
|
|
|
println!("Connected to server");
|
|
|
|
|
|
2024-11-03 12:49:23 -08:00
|
|
|
let request = Request::new(
|
|
|
|
|
&OPTIONS.username,
|
|
|
|
|
&OPTIONS.password,
|
|
|
|
|
"ignore-this",
|
|
|
|
|
"also-ignore-this",
|
|
|
|
|
);
|
2024-11-02 15:58:35 -07:00
|
|
|
|
|
|
|
|
request.write_to_stream(&mut stream)?;
|
|
|
|
|
let response = read_string(&mut stream)?;
|
2025-07-01 20:37:00 -07:00
|
|
|
println!("Response: {response}");
|
2024-11-02 15:58:35 -07:00
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|