I am trying to create a program whereby it uses two forms that act as servers. How can I code if one server fails another server should automatically take control. I'm not sure but can this be done using an array?
many thanks for any replies
Do you mean you call public methods to an instance of a form?
By "fail", do you mean there is an error? I think what you want is to add error handling. If there's a flaw in the form's code that causes an error, there's really not much sense in trying to create a new instance of the form to replace the original, as the new one will just get the same error.
Sorry for not explaining better, this program is just a simple number game where forms act as clients and a server. What I mean by server, this responds to client inputs. I need to setup a 2nd form using the winsock control. I need to code if form1(server1) should fail, then form2(server2) can take over. This is just a prototype in the event of failure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.