connecting a client to multiple servers

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2008
Posts: 52
Reputation: Bhoot is an unknown quantity at this point 
Solved Threads: 1
Bhoot's Avatar
Bhoot Bhoot is offline Offline
Junior Poster in Training

connecting a client to multiple servers

 
0
  #1
May 7th, 2009
I am developing a form application (UI) through which I need to connect a client to multiple servers.
For that, i would require an array of either Socket objects or TcpClient objects.
My dilemma is where i should put this array.
I cannot put the array in the static class containing the Main() method.
Also, i dont think it would be good to put it inside Main() (although, i may be wrong.)
I thought of placing it in an independent class so that i may add some functionality if required.
  1. class Clients
  2. {
  3. private TcpClient[] tcpClients = new TcpClients[5];
  4. }

But, i would face lots of problems here (like accessing the sockets).
Would anyone shed some light on this? I know this is a bit weird question.
Bhoot
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 52
Reputation: Bhoot is an unknown quantity at this point 
Solved Threads: 1
Bhoot's Avatar
Bhoot Bhoot is offline Offline
Junior Poster in Training

Re: connecting a client to multiple servers

 
0
  #2
May 7th, 2009
okay fine..it was a stupid question. After an hour or so, it clicked me to place the array in the class that i (infact, Visual Studio) would derive from Form class.
Bhoot
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC