Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Named Pipes server with multiple clients

Posted on 2009-05-11
4
Medium Priority
?
3,260 Views
Last Modified: 2013-11-05
Hi all,

I have a project that needs some inter process communication.
I'm looking at using Named Pipes for this purpose.

I mananged to create a Server instance ( class NamedPipeServerStream ),
and a Client instance ( class NamedPipeClientStream),
connect them and exchange messages and binary data by using asynchronous methods -
BeginWaitForConnection  , BeginRead , BeginWrite.

I'm trying to connect more then one client to the Pipe Service and I can't do it.

After the first client has connected, I'm getting an exception when try to listen for another connection:
NamedPipeServerStream.BeginWaitForConnection  
throws a InvalidOperationException with the message "Already in a connected state."

How can I create a server that will allow multiple clients.

Thank you,
Avital
0
Comment
Question by:avitalk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 16

Assisted Solution

by:CuteBug
CuteBug earned 200 total points
ID: 24353575
0
 
LVL 1

Author Comment

by:avitalk
ID: 24357383
Thank you.
But I don't understand how that's helpful.
Do you mean that I should be using sockets instead of named pipes ?
0
 
LVL 16

Expert Comment

by:CuteBug
ID: 24360391
Yes... that would be a better approach.
0
 
LVL 1

Accepted Solution

by:
avitalk earned 0 total points
ID: 24420210
no solution was found
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question