I have an App that is using Winsock to send data back and forth between the host and client. The Host and client Apps are identical. The computer knows "who is who" by the user(s) clicking on a button marked "Run as Host" or "connect to remote Host". Now is where I start to get confused. I want the server to 'request' a username and password.
How would I accomplish this? I had thought about using an "ID character" in front of any winsock.sendData calls, but quickly realized that I would be writing 10s of thousands of lines of code considering that I will need to be synchronizing all the clients to the server and vise-versa. All of the variables will have the exact same names on the host as on the clients, differentiated by username (so theres no variable name conflicts).
If you havnt already guessed..this app is a form of an online RPG. I need to retrieve all of the client users info (such as attribute scores, name, skill names and ratings etc....) and then display that info on the hosts screen. And also allow the host to modify some of the information later if needed. Rather than a long, long, long.......long series of getdata/senddata routines, is there an easier method to "synchronize" variables with winsock?
If I have not been clear in exactly what I need help with, please feel free to ask me any questions. I will be more than happy to help you help me.
How would I accomplish this? I had thought about using an "ID character" in front of any winsock.sendData calls, but quickly realized that I would be writing 10s of thousands of lines of code considering that I will need to be synchronizing all the clients to the server and vise-versa. All of the variables will have the exact same names on the host as on the clients, differentiated by username (so theres no variable name conflicts).
If you havnt already guessed..this app is a form of an online RPG. I need to retrieve all of the client users info (such as attribute scores, name, skill names and ratings etc....) and then display that info on the hosts screen. And also allow the host to modify some of the information later if needed. Rather than a long, long, long.......long series of getdata/senddata routines, is there an easier method to "synchronize" variables with winsock?
If I have not been clear in exactly what I need help with, please feel free to ask me any questions. I will be more than happy to help you help me.