Click here to Skip to main content
15,944,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,
I am onto one project in which I have to make connection between One WebApplication and multiple Client Devices. Now for every Device I am making a thread (TcpListener object) which listens for that Device . This is making my WebApplication at server very bulky. For every client I am making one thread. Suppose if 100 such devices, then 100 threads.
Is there any other approach ...???
Posted

Yes, just use a web service.

That is all.
 
Share this answer
 
Hi,

As you mentioned multiple devices, so you can go for WCF with net TCP binding.
Because in net TCP binding you can get a callback.

http://msdn.microsoft.com/en-us/library/ff647180.aspx#Step1[^]

using callback event you don't need monitor using thread. :)
 
Share this answer
 
v2
Comments
Robin Purbia 3-Jan-13 0:44am    
Okay... I'll study this ... and hope this helps me ... thanks
Robin Purbia 8-Jan-13 4:22am    
Please give me any appropriate example of WCF netTCP binding ....... Thanks in advance...
Suvabrata Roy 8-Jan-13 5:36am    
http://www.dotnetspider.com/attachments/Resources/19314-301840-WCF_SimpleClientServer_net_tcp.zip

Article :
http://www.dotnetspider.com/resources/19314-Client-server-sample-using-WCF-net-tcp-binding.aspx

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