ptnio - Portable TCP Network IO

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Posts: 12
Joined: 17 Dec 2016 12:49

ptnio - Portable TCP Network IO

#1 Post by TSnake41 » 27 Jul 2018 16:39

Hello dostips community :)

Code: Select all

 _  |_  _  .  _
|_) |_ | ) | (_)
What? : Well, this is a very capable command that adds TCP/IP ability to batch.
So, it opens the Batch programming to the whole world of networking.

What can you do with? :
- inter-batch communication
- network batch games (a pretty broken one from an old project)
- a web server (http only) (please use dos9 instead of regular cmd due to a weird cmd bug with pipe)
- a web client (http only)
- a ftp client/server
- a remote console
- IPv6 8)

What can you theorically do with ? : (let's be crasy :D)
- A Discord bot
- A Minecraft server/client
- A web browser (what ?)
- a bittorent client (maybe)

What can't you do (currently) ? :
- a Fortnite client (no UDP, no chocolate :()
- something that use UDP (e.g ENet) or something else than TCP (e.g SCTP)

How ? : ptnio uses a custom inter-process communication mecanism that permit to run in the process in the background and interact it using '-c' argument.
There is a lot a things behind the scene that will be explained later, in a document.
But, you can hack into the source code (C) ;)

Is that fake/bullshit ? : No, you can check it by yourself with source code there :

- ptnio + few examples
- 'dist' archive (with darkbox, tcc, and many other things) (Coming Soon)
- Source code or
If you can't open the archive, please use 7-Zip (which is fully free)

How to use this ?: There is a small documentation and you can check examples/tests.

Tips :
- localhost (current computer) : (or ::1 with IPv6)
- listen from anywhere ip :
e.g : receiver_test : IP=, PORT=whatever port; sender_test : IP=, PORT=same as receiver.

Few details on ptnio.exe :
- Size: 20 kio
- Compiler used : Tiny C Compiler
- Virustotal anaysis 3/67
- Developpment platforms (works on all of them) : XP, 10, Linux (with Dos9)
Last edited by TSnake41 on 30 Jul 2018 09:47, edited 1 time in total.

Posts: 404
Joined: 02 May 2016 18:20

Re: ptnio - Portable TCP Network IO

#2 Post by misol101 » 29 Jul 2018 13:30

Haven’t tried it (yet), but I appreciate the effort involved!

Posts: 404
Joined: 02 May 2016 18:20

Re: ptnio - Portable TCP Network IO

#3 Post by misol101 » 16 Jan 2020 19:16

Took me a year and a half to get around to it, but I finally tried it and it works as advertised as far as I can tell. Good job! :!:

See viewtopic.php?t=7321 for where it was used.


Post Reply