Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21131

Problem with connecting one server to another : How to solve

$
0
0
In a multi-server/client system I have it so that as each server is launched it connects to a central server (ServerA). The first server that connects to A is sent it's server number as 1. The second server that connects to A is sent it's server number 2, etc, etc. Each server is also sent a list of all the other running servers to connect to.

Now each server is running but they have not connected to each other until the operator clicks on Connect. If the operator clicks on Connect in sequential order then all servers are connected to each other.

It works like this:

Server 1's Connect button is clicked. It has no other servers to connect to
Server 2's Connect button is clicked. It has to connect to Server 1
Server 3's Connect button is clicked. It has to connect to Server 2 and 1
Server 4's Connect button is clicked. It has to connect to Server 3, 2, and 1
etc
etc
Server 8's Connect button is clicked. It has to connect to Server 7, 6, 5, 4, 3, 2, and 1

This ensures all servers have a connection to every other server.

However, if for some reason the operator gets things messed up, let's say he does it backwards, then I have a connection problem:

Like this:

Server 8's Connect button is clicked. It is supposed to connect to servers 7, 6, 5, 4, 3, 2, and 1. However, those servers' Connect buttons have not been clicked yet. So, Server 8 fails in connecting to the rest of the servers.

Now, operator clicks on Server7's Connect button. Again the problem is that Server7 cannot connect to servers 6, 5, 4, 3, 2, and 1

Server6 cannot connect to servers 5, 4, 3, 2, and 1

etc, etc

How can I get around this problem?

Viewing all articles
Browse latest Browse all 21131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>