• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1095
  • Last Modified:

Named Pipe

I am using named pipe mechanism for interproces communication . My server programm cteates
local named pipe with one pipe instance, connects to the pipe and read.  After some timeout  it disconnect from pipe and close pipe handle. . After  disconnecting and closing the pipe handle,
server tries to create pipe with the same name and parameters and connects to it , but GetLastError
back error 231 (All pipe instances are busy. ERROR_PIPE_BUSY). In the client side I connect to the
pipe with CreateFile and write. I never close the pipe handle in the client programm.  What's  wrong in this scenario and what's the rihgt way for using named pipe ?
Yes. I close client pipe handle.
0
lilya
Asked:
lilya
1 Solution
 
eelkoCommented:
Shouldn't you close the pipe handle in the client program ?
0
 
lilyaAuthor Commented:
Edited text of question
0
 
q2guoCommented:
Hi Lilya

You said in your question:
"I never close the pipe handle in the client program"
"I close client pipe handle. "

I am confused, did you close the client pipe handle before recreating the pipe using the server, or didn't you?
0
 
danbalaCommented:
You have to cloes either the server's read end and the client's write end
or vice-versa! -before reading or writing to the pipe!!!

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now