| | |
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 barchart bitmap box broadcast buttons c# cast check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mailmerge mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox robot save saving serialization server sleep socket sockets sql sql-server statistics stream string stringformatting sun table tcp text textbox thread time timer update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





