socket suggestion
-
Hi, I need a suggestion in handling socket communication in my project. i am writing a diagnostic software which will run in a laptop. The laptop will be hooked upto a ring network ( 5 computers connected together in ring topology). Where i have to communicate to all the computers connected and have to send/receive diagnostic messages to all/particular computer. I am thinking about creating multiple client socket( in diagnostic software )for all the computers connected. Each computer will run a server socket which will listen for client connection. In this case i suppose to create 5 client socket (since 5 computers connected) and each computer will have its server socket. Is there anyway to simplify this ie. one server socket on laptop and one client socket on each computer. In this case a client socket can't listen for server connections right? Please suggest a better way, i want to do in TCP not in UDP or suggest any article which will help me understand this better. Thanks Srini
-
Hi, I need a suggestion in handling socket communication in my project. i am writing a diagnostic software which will run in a laptop. The laptop will be hooked upto a ring network ( 5 computers connected together in ring topology). Where i have to communicate to all the computers connected and have to send/receive diagnostic messages to all/particular computer. I am thinking about creating multiple client socket( in diagnostic software )for all the computers connected. Each computer will run a server socket which will listen for client connection. In this case i suppose to create 5 client socket (since 5 computers connected) and each computer will have its server socket. Is there anyway to simplify this ie. one server socket on laptop and one client socket on each computer. In this case a client socket can't listen for server connections right? Please suggest a better way, i want to do in TCP not in UDP or suggest any article which will help me understand this better. Thanks Srini
I do not know much about Stream-Socket connections but I know you can create just a server on a computer then have 4 clients on each computer. Because with the server you can still talk through it (use it like a client also). I read it in a book I was reading... it was in Deitel.com C# code examples.. you will have to register. You will have a server that listens. TcpListener listener; int counter = 1; IPAddress local = IPAddress.Parse( "127.0.0.1" ); listener = new TcpListener( local, 50000 ); listener.Start(); Then you create the clients that connects to the server TcpClient client; client = new TcpClient(); client.Connect( "127.0.0.1", 50000 ); Like I said.. there is more, too much to post on here. Register on the website and check it out. I don't know much, but I was reading it not too long ago.. hope this helps a little bit! Others have helped me, so hopefully I can have my chance to help someone else :)