Index:
[thread]
[date]
[subject]
[author]
From: becka@rz.uni-duesseldorf.de
To : ggi-develop@eskimo.com
Date: Sun, 18 Apr 1999 13:18:31 +0200 (MEST)
Re: New ggi program released (and network programming question)
Hi !
> More information, screenshot, and downloads are available at
> http://e.x0r.ml.org/phere .
Downloads don't work. Server tells file doesn't exist.
> My question: I understand it's better to have updating done
> using UDP (because there's less overhead, no retransmission,
> etc). Currently, when a person joins, the server sends a UDP
> message to all of the clients. What has occurred to me,
> though, is that UDP isn't reliable. This means it is possible
> that the message will be lost. Losing any important message
> (ie "change map") wouldn't be good.
Yes.
> I can see two possible solutions:
> - Establish a TCP connection and a UDP "connection"
That's pretty awkward I'd say ...
> - Require clients to respond with an "I got it" message to
> important messages over UDP. Problems: extra complexity,
> bandwidth overhead (which seems unavoidable no matter what).
Yes - I'd do that. It's basically what TCP does "under the hood".
The server keeps track of all clients anyway - right ?
Well - it has to so it knows where to distribute updates.
So I'd just add a "waiting for ACK" queue to the array (?) that holds the
data for the clients. You add all packets that need an ACK to that queue
together with a timestamp and a retransmission count. If you get an ACK from
a client, you delete the record from the queue.
Other than that, you regularly check the queues and see if a packet has been
there for too long. If so, retransmit, and if the retransmission count
becomes too high, consider the client dead and remove it from the list.
I think that's the simplest solution. Maybe someone proves me wrong ? :-)
CU, ANdy
--
= Andreas Beck | Email : <andreas.beck@ggi-project.org> =
Index:
[thread]
[date]
[subject]
[author]