Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to know Is it possible to create a application which acts as a server for multiple clients as well as acts as a client for host server?

In my scenario I want to receive request from multiple clients and send this request to another host server machine which has database access and this machine sends respose to my server machine and this server finally send response to client.

Please give me any suggesstions for this?

thanks.
Posted
Updated 29-Jul-15 18:14pm
v2
Comments
Richard MacCutchan 29-Jul-15 6:57am    
Yes it is possible, and not difficult. Just add the relevant code and pass the messages between them.
Kornfeld Eliyahu Peter 29-Jul-15 7:21am    
Yes, it is possible, but probably not worth it...
Member 11543226 29-Jul-15 7:59am    
Can you give me some links or whatever regarding to that, now i code for server and its working fine also. but at other end it can not connected to other server
johannesnestler 29-Jul-15 10:31am    
Server and Client could mean everything. From your question I'd guess you talk about Wcf-Services? But better not guessing, please update your question and Tag it with the technologies you want to use - Client and Server are Terms that could mean a thousends things in IT industry and programming.

1 solution

1.Yes it is possible, and the best solution that I see in .NET is by using WCF.
So your server will implement a WCF service and will provide this interface for communication with its clients and also will could be client by communicating with other server/ servers that are exposing their WCF services.

2.I suggest you also to host your main server (that is also client) into an application of type windows services.

3.If you are interesting in speed optimisation, and if your main server and the other host servers that communicates with it are installed on the same server/LAN they should communicate by using NetPipe binding otherwise NetTcp binding is the fastest.

4.For more details there are a lot of article on the net about WCF subject, including the next ones:
NetPipe Binding in WCF using window service[^]
NetTcp Binding in WCF using window service[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900