Python Forum

Full Version: All pipe instances are busy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?