test completed
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -15,10 +15,18 @@ fn main() {
|
||||
stream.flush();*/
|
||||
println!("Go!");
|
||||
let leng = stream.read(&mut buf).unwrap();
|
||||
println!("{}", leng);
|
||||
println!("{}", buf[6]);
|
||||
if buf[0] < 200 {
|
||||
buf[(buf[0]-1) as usize] += 2;
|
||||
let mut sstream = TcpStream::connect("127.0.0.1:25565").unwrap();
|
||||
let mut sstream;
|
||||
|
||||
if buf[6]==49 {
|
||||
buf[(buf[0]-1) as usize] -= 2;
|
||||
sstream = TcpStream::connect("127.0.0.1:25565").unwrap();
|
||||
} else {
|
||||
buf[(buf[0]-1) as usize] -= 1;
|
||||
sstream = TcpStream::connect("127.0.0.1:25566").unwrap();
|
||||
}
|
||||
//let mut sstream = TcpStream::connect("127.0.0.1:25565").unwrap();
|
||||
sstream.write(&buf[.. leng]);
|
||||
let c1 = client::Client::new(stream,sstream, &buf);
|
||||
c1.to_string();
|
||||
|
||||
Reference in New Issue
Block a user