添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
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, 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,
                                                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?