Initial network support

This commit is contained in:
Keith Winstein
2011-08-02 12:49:02 -04:00
parent 507e791888
commit 6ea66b7aab
5 changed files with 127 additions and 3 deletions
+33
View File
@@ -0,0 +1,33 @@
1. server maintains:
every frame it has ever been in.
every packet it has ever sent.
packet has: frame no, frame it depends on (maybe nothing),
0 server's Last Known Client Frame
client has told us the latest frame it can now contruct
some packets have transmitted frames > this recently, but those
frames haven't yet been acked
some packets may have transmitted frames > this long ago
and haven't been acked. we call those lost
2. most recent frame is "current frame"
most recent frame not lost is "presumed client frame"
most recent frame acked is "last known client frame"
3. goal: transmit current frame to client by most efficient means
could send packet depending on "nothing", "presumed client frame",
or "last known client frame"
4. when client gets a packet, it tells us the latest frame it
can now construct
5. when sending packet, server tells client last known client frame.
client discards all frames older than this.