Should i share pipe proxy instance?

I have one proxy endpoint net.pipe://localhost/PipeConsole and one communication interface. I have two pieces in program that want to use this interface in different way (call different subset of methods, may intercept) Should each of them create pipe proxy instance or I should share it? What if two threads will try to access same pipe proxy method at the same time?

ChannelFactory<IManagementConsole> pipeFactory =
            new ChannelFactory<IManagementConsole>(
                new NetNamedPipeBinding(),
                new EndpointAddress("net.pipe://localhost/PipeConsole"));

Answers


ChannelFactory instances are thread safe, so you should be good, i myself share same instance of proxy between multiple threads, and it works fine.


Need Your Help

Nextpeer : Waiting for players screen getting blank in iPhone

ios iphone nextpeer

I have recently integrated nextpeer to my iPhone game. What I observed is while I am launching NextPeer dashboard after clicking on "Play" button there should be waiting for other players screen wh...

jQuery dialog IE7 issues

jquery jquery-ui dialog modal-dialog titlebar

I am having trouble with the width of the titlebar in IE7 only. The first dialog function when opened using the width: 'auto' the titlebar does not extend across the entire dialog window. The sec...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.