I got a problem with interprocess communication.
I am working on a project using named pipes for Server/Client communication.
Server:
Creates named pipe.
Reads Events.
Client:
Connects to the named pipe.
Sends Events.
Test procedure:
step1: Run server.exe, it creates a named pipe.
step2: Run Client.exe, it connects to named pipe and sends the events.
Observation: server.exe receives the events sent by Client.exe.
step3: close the client.exe.
step4: Run Client.exe again.
Obseration: Error 231( All pipe instances are busy).
Note: server.exe is never closed.
The code in the Client.exe has been confirmed to close pipe and disconnect pipe as below code.
closeStatus = DisconnectNamedPipe(h_HandlePipe);
closeStatus = CloseHandle(h_HandlePipe);
Please help to overcome this issue.
Thanks,
Thanks for your reply.
Yes, the server has to be forcefully open again in order to establish connection with the client.
Is there a way I could implement so that the server is just opened once to connect to client multiple times?
Thanks,