This commit is contained in:
Keanu D?lle 2022-12-28 00:53:33 +01:00
commit c51f47ca30
8 changed files with 115 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

8
.idea/.gitignore vendored Normal file
View File

@ -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

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/pixelflut.iml" filepath="$PROJECT_DIR$/.idea/pixelflut.iml" />
</modules>
</component>
</project>

11
.idea/pixelflut.iml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

7
Cargo.lock generated Normal file
View File

@ -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"

8
Cargo.toml Normal file
View File

@ -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]

66
src/main.rs Normal file
View File

@ -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();
}