Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Duplex pipes
#1
Hi
I have created to projects for a client and server user named pipes by following the code here
Server
and
Client

Everything works correctly
But I need full duplex so either side can read and write
I tried creating a read thread in the server
t = threading.Thread(target=read, args=(pipe,))
t.start()

def read(p):
    while True:
        # Read the data from the named Pipe
        resp = win32file.ReadFile(p, 65536)
        print(f"Data Received: {resp}")  # if function fails, the return value will be zero
The client connects but the server app crashes when writing to the pipe

How can I achieve this
Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to run linux command with multi pipes by python !! evilcode1 2 648 Jan-25-2021, 11:19 AM
Last Post: DeaD_EyE
  Duplex Named Pipe with Python Server and C# Clients raybowman 1 598 Dec-03-2020, 09:58 PM
Last Post: Gribouillis
  waiting for the first of many pipes to send data Skaperen 7 1,520 May-05-2019, 10:57 PM
Last Post: Skaperen
  reading from 2 pipes Skaperen 2 1,458 Oct-05-2018, 04:45 AM
Last Post: Skaperen
  reading from two or more pipes Skaperen 2 2,370 Dec-28-2016, 03:06 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020