| | |
connecting a client to multiple servers
Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
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
Views: 443 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access algorithm array barchart bitmap box button buttons c# chat check checkbox class client code color combobox control conversion csharp custom database datagridview dataset datetime degrees draganddrop drawing encryption enum excel file files form format forms ftp function gcd gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





