RetroArch/network
Gregor Richards 69b7dc0d08 Multitudinous fixes and updates to Netplay. Had to be one commit since
they're mostly related:

(1) Renamed frame_count to self_frame_count to be consistent with all
other names.

(2) Previously, it was possible to overwrite data in the ring buffer
that hadn't yet been used. Now that's not possible, but that just
changes one breakage for another: It's now possible to miss the NEW
data. The final resolution for this will probably be requesting stalls.
This is accomplished simply by storing frame numbers in the ring buffer
and checking them against the 'other' head.

(3) In TCP packets, separated cmd_size from cmd. It was beyond pointless
for these to be combined, and restricted cmd_size to 16 bits, which
will probably fail when/if state loading is supported.

(4) Readahead is now allowed. In the past, if the peer got ahead of us,
we would simply ignore their data. Thus, if they got too far ahead of
us, we'd stop reading their data altogether. Fabulous. Now, we're happy
to read future input.

(5) If the peer gets too far ahead of us (currently an unconfigurable 10
frames), fast forward to catch up. This should prevent desync due to
clock drift or stutter.

(6) Used frame_count in a few places where ptr was used. Doing a
comparison of pointers on a ring buffer is a far more dangerous way to
assure we're done with a task than simply using the count, since the
ring buffer is... well, a ring.

(7) Renamed tmp_{ptr,frame_count} to replay_{ptr,frame_count} for
clarity.

(8) Slightly changed the protocol version hash, just to assure that
other clients wouldn't think they were compatible with this one.

(9) There was an off-by-one error which, under some circumstances, could
allow the replay engine to run a complete round through the ring buffer,
replaying stale data. Fixed.
2016-09-13 21:32:57 -04:00
..
httpserver Cleanups 2016-09-12 18:18:20 +02:00
netplay Multitudinous fixes and updates to Netplay. Had to be one commit since 2016-09-13 21:32:57 -04:00
net_http_special.c Move performance.c to libretro-common/features/features_cpu.c 2016-05-10 20:31:27 +02:00
net_http_special.h Move libretro.h headers to libretro-common/include 2016-05-10 19:03:53 +02:00
net_logger.c Move netplay code to network/netplay dir 2016-05-19 11:46:54 +02:00