| | |
connecting a client to multiple servers
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
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.
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.
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.
C# Syntax (Toggle Plain Text)
class Clients { private TcpClient[] tcpClients = new TcpClients[5]; }
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
![]() |
Similar Threads
- Dansguardian - "Unable to getgrnam(): Success" (*nix Software)
- Urgent Help: Connect to multiple Servers (C#)
- Problem with new XP systems getting corrupt user profiles (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: why?!!!
- Next Thread: crystal report problem
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client clock color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum event excel file form format forms function gdi+ hospitalmanagementsystems httpwebrequest image index input install interface java label list listbox mandelbrot math microsystems mouseclick mysql operator password path photoshop picturebox pixelinversion post programming property radians regex remote remoting richtextbox running... serialization server sleep soap socket sql sqlserver stack statistics stream string table text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf write xml





