-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Communication finally possible! NO WS!!!
- Loading branch information
1 parent
15db3dd
commit 6c0c9d0
Showing
7 changed files
with
95 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Performance test | ||
A simple performance test designed to compute hash in a high frequent and multithreading. Always be improved! | ||
# Requirement | ||
- Node (lastest) | ||
- Windows (For batch files) or Linux (for .sh files) | ||
# (Possible) Consenquences | ||
1. May cause the system to freeze, lag, unstable and become unresponsive. Please keep track on this thing using Task Manager. If your system become snail, kill it using killswitch. | ||
2. If ran in a long time, it may cause some possible damage to the hardware, decreasing the system durability. Please be careful | ||
3. May be harmful for old PCs, of course | ||
# DENIAL OF RESPONSIBILITY | ||
THE CREATOR HEREBY DENY ALL THE DAMAGE CAUSED BY THIS PROGRAM. PLEASE BE CAREFUL USING THIS AS THIS MAY CAUSE SOME DAMAGE TO YOUR SYSTEM. PLEASE DO NOT CONTACT US FOR HELP OR FIX ISSUES BY THIS PROGRAM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
@echo off | ||
start "Lagg" node . | ||
REM # | performance-test by Nullified. | ||
REM # | You're responsible for any damage caused by this tool | ||
REM # | Please be careful using this. We (the creators) will | ||
REM # | NOT responsible for any damage caused by this tool. | ||
REM # | Thanks for using. Part of tcp-toolkit | ||
choice /M "Press A to cancel, B to start, C for README.md" /C abc /N | ||
if %errorlevel%==3 ( | ||
start readme.md | ||
exit | ||
) | ||
if %errorlevel%==2 ( | ||
start "Lagg" node . | ||
) | ||
if %errorlevel%==1 ( | ||
exit | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// TCP Server designed to wirk with 0xSnowflakeXD/tcp-toolkit/tcp-client | ||
// Who know how it works? | ||
// I'll provide a wiki soon as i officially release this. | ||
// NOTICE: tcp-client ONLY PARTIALLY WORK WITH tcp-server UNTOUCHED! PLEASE DON'T CHANGE THE SERVER PORT OTHERWISE IT'LL CORRUPT! | ||
|
||
const net = require('net') | ||
const fs = require('fs') | ||
const path = require('path') | ||
const { stdout: stdout, stdin: stdin } = require('process') | ||
|
||
if(!fs.existsSync(path.resolve('./cfg.json'))) { | ||
fs.appendFileSync(path.resolve('./cfg.json'), JSON.stringify({backlog: 256, port: 55674})) | ||
} | ||
const options = require('./cfg.json') | ||
|
||
const server = net.createServer() | ||
server.on("connection", (socket) => { | ||
stdout.write("Client connected!" + '\n') | ||
socket.on("data", (d) => { | ||
console.log(d.toString('utf-8')) | ||
}) | ||
socket.on("end", () => { | ||
console.log("Ended connection!") | ||
}) | ||
socket.on("error", (err) => {}) | ||
}) | ||
|
||
server.listen(options.port, '0.0.0.0', options.backlog, () => { | ||
stdout.write('Server started! Listening on ' + server.address().address + ':' + server.address().port + '\n') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "tcp-server", | ||
"version": "1.0.0", | ||
"description": "TCP Server", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "._thunderstrike", | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/0xSnowflakeXD/tcp-toolkit.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/0xSnowflakeXD/tcp-toolkit/issues" | ||
}, | ||
"homepage": "https://github.com/0xSnowflakeXD/tcp-toolkit#readme" | ||
} |