I am working on a update server that will be connected to by the launcher for my program. My current idea is to loop constantly picking up each connection request (TCP) and then comparing the client's version with the server's version.
Now once the server has confirmed the client needs updating I have three possibly routes:
1. An array of connections, each loop the server sends part of the file to them (size will be determined by the amount of players and the servers upload speed).
2. A web address (possibly secured by making the address a PHP page which requires a unique ID before it gives the client the file? A list of unique IPs that had been issued would also be involved) which the server gives to the client and then the client can download the new EXE from there?
3. The server spawns a new thread to do the task.
3 replies to this topic
#1
Posted 25 November 2011 - 11:48 AM
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
|
|
|
#2
Posted 25 November 2011 - 03:02 PM
I would create an event for each successful connection, and then compare client's and server's version. Then, if versions don't match, you could send back the file or address where to get it.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#3
Posted 25 November 2011 - 04:10 PM
The issue is I assume that the functions in SDL_net hold up the program until the file is sent?
Thus I would need a loop of some kind...
Thus I would need a loop of some kind...
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
#4
Posted 25 November 2011 - 05:56 PM
Yea, it's quite possible that sending data to one client will put others on hold. I don't have much threading experience, but I'd say you need at least 2 threads, 1 to check for incoming connections and 1 to send data back.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









