Im currently making a named pipes system (server and client) for a much bigger project of mine. The goal is to create a Inter-Process Communication system that would allow multiple sub-system to communicate to each other.
In my IPC system i wanted to use Sockets but i use a Windows 11 system (i want it to be able to work on windows and linux, but linux seems easier with this stuff, so in this example im just focusing on windows) so i decided to use Named Pipes specifically from the Win32 Library. Im trying to make it similar to how websocket servers/clients work. The problem i seem to be having is with win32pipe's ReadFile method. It blocks the entire thread until it gets something from the pipe. Im tried to use asyncio's wait_for function, or there tasks system to basically timeout the function if it is taking too long, but all has failed. Here is the code:
server.py = https://pastebin.com/JmCqK6Rc
client.py = https://pastebin.com/vbTDeaP7
You must run server.py first then client.py (gonna fix it later). Also once its running, you are going to be prompted to send data between (on both scripts), but the issue on display here is how nether side will receive what gets sent. I dont know why its doing that, probably my limited knowledge of asyncio. If anyone could help me fix this, guide me to solving this, or just flat out telling me a better way to do all of this, i would be happy to listen. After you send that data, you can press enter again to close each side (both need to be off for it to close, again, gonna fix it eventually, im really tired ๐ญ)
If you need me to explain something, let me know.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.