0

I'm developing a service which communicates with a client.

Both are on the same machine.

To achieve this, I'm using named pipes. Server and client can start the communication, so I am creating 2 named pipes.

So both server and client act as server and client as they need to.

But this is only to connect one module to the service. I have 5 modules for now.

My question then is:

Is there any limit creating named pipes? each named pipe has just one client connected to each server, so I'm not trying to connect 50 clients to the same server.

But is there any limitation on Windows on how many named pipes can I have?

I did some research, but couldn't find any good answers. And did not find anything in msdn.

Jay
  • 6,224
  • 4
  • 20
  • 23
AAlferez
  • 1,480
  • 1
  • 22
  • 48
  • I'm not sure about named pipes, but UDP works very well in peer - peer environments, it may be worth looking into. – Jay Jul 30 '13 at 14:35
  • You mean how many connections can you make to a client? – Ehsan Jul 30 '13 at 14:35
  • Yes, there is a limit. If nothing else, there's a [limit on the number of operating system handles](http://blogs.msdn.com/b/oldnewthing/archive/2007/07/18/3926581.aspx). In addition, each named pipe requires some other resources: memory, etc. So it's possible (although unlikely) to meet that limit. You'll likely run into other problems (performance) with lots of pipes long before you reached any operating system limitation. – Jim Mischel Jul 30 '13 at 14:39
  • How many named pipes can I create...simple – AAlferez Jul 30 '13 at 14:45
  • So you are telling me I can make 10 and have no issue at all – AAlferez Jul 30 '13 at 14:45
  • 1
    You will be able to make hundreds. – Matthew Watson Jul 30 '13 at 14:48
  • You need to watch our on how the named pipes are created. We ran into an issue where an administrator created the first session - and additional connections/mappings were not allowed after that. See here for more details: http://stackoverflow.com/questions/14615457/wcf-local-only-namedpipe – tsells Jul 30 '13 at 17:47
  • Anyone wants to put it as answer and get +1? – AAlferez Jul 30 '13 at 19:16

1 Answers1

0

Thats right, it just depends on the resources of your computer, so I can make as many as I need with no worries. Thanks for the comments

AAlferez
  • 1,480
  • 1
  • 22
  • 48