From c51f47ca302f53954b1f1d6f9921aee0e067f9a0 Mon Sep 17 00:00:00 2001 From: Keanu D?lle Date: Wed, 28 Dec 2022 00:53:33 +0100 Subject: [PATCH] new --- .gitignore | 1 + .idea/.gitignore | 8 ++++++ .idea/modules.xml | 8 ++++++ .idea/pixelflut.iml | 11 ++++++++ .idea/vcs.xml | 6 +++++ Cargo.lock | 7 +++++ Cargo.toml | 8 ++++++ src/main.rs | 66 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 115 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/modules.xml create mode 100644 .idea/pixelflut.iml create mode 100644 .idea/vcs.xml create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..671163b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/pixelflut.iml b/.idea/pixelflut.iml new file mode 100644 index 0000000..c254557 --- /dev/null +++ b/.idea/pixelflut.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..9a2053f --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "pixelflut" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..fa68979 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pixelflut" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..c3cd5b9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,66 @@ +use std::io::Write; +use std::net::TcpStream; +use std::thread; + +fn main() { + thread::spawn(|| { + let mut stream = TcpStream::connect("schenklflut.de:1234").unwrap(); + println!("Connected to the server!"); + loop { + for x in 1..1280 { + for y in 1..50 { + let command = format!("PX {} {} 5BCEFA\n", x, y); + stream.write_all(command.as_str().as_ref()).unwrap() + } + } + } + }); + thread::spawn(|| { + let mut stream = TcpStream::connect("schenklflut.de:1234").unwrap(); + println!("Connected to the server!"); + loop { + for x in 1..1280 { + for y in 50..100 { + let command = format!("PX {} {} F5A9B8\n", x, y); + stream.write_all(command.as_str().as_ref()).unwrap() + } + } + } + }); + thread::spawn(|| { + let mut stream = TcpStream::connect("schenklflut.de:1234").unwrap(); + println!("Connected to the server!"); + loop { + for x in 1..1280 { + for y in 100..150 { + let command = format!("PX {} {} FFFFFF\n", x, y); + stream.write_all(command.as_str().as_ref()).unwrap() + } + } + } + }); + thread::spawn(|| { + let mut stream = TcpStream::connect("schenklflut.de:1234").unwrap(); + println!("Connected to the server!"); + loop { + for x in 1..1280 { + for y in 150..200 { + let command = format!("PX {} {} F5A9B8\n", x, y); + stream.write_all(command.as_str().as_ref()).unwrap() + } + } + } + }); + thread::spawn(|| { + let mut stream = TcpStream::connect("schenklflut.de:1234").unwrap(); + println!("Connected to the server!"); + loop { + for x in 1..1280 { + for y in 200..250 { + let command = format!("PX {} {} 5BCEFA\n", x, y); + stream.write_all(command.as_str().as_ref()).unwrap() + } + } + } + }).join().unwrap(); +}