Python Forum
All pipe instances are busy - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: All pipe instances are busy (/thread-31872.html)



All pipe instances are busy - GrahamL - Jan-07-2021

Hi
I am trying to use pipes to communicate between 2 python apps
On the server side I create a named pipe
      
self.server_pipe = win32pipe.CreateNamedPipe(r'\\.\pipe\DataUpdate',
                                                     win32pipe.PIPE_ACCESS_DUPLEX,
                                                     win32pipe.PIPE_TYPE_MESSAGE | win32pipe.PIPE_READMODE_MESSAGE | win32pipe.PIPE_WAIT,
                                                     win32pipe.PIPE_UNLIMITED_INSTANCES,
                                                     65536,
                                                     65536,
                                                     0,
                                                     None)
        win32pipe.ConnectNamedPipe(self.server_pipe, None)
Then on the client side
        self.client_pipe = win32file.CreateFile(r'\\.\pipe\DataUpdate',
                                                win32file.GENERIC_READ | win32file.GENERIC_WRITE,
                                                0,
                                                None,
                                                win32file.OPEN_EXISTING,
                                                win32file.FILE_ATTRIBUTE_NORMAL,
                                                None)
        res = win32pipe.SetNamedPipeHandleState(self.client_pipe,
                                                win32pipe.PIPE_READMODE_MESSAGE,
                                                None,
                                                None)
I start the server first but when I run the client I get
pywintypes.error: (231, 'CreateFile', 'All pipe instances are busy.')

Have I missed something?