Gregor Richards
7e2465ef1f
Refactoring: Moving I/O functionality into netplay_io.c
2016-12-18 19:28:43 -05:00
Gregor Richards
8c59c7dd77
Starting to refactor: Separating frontend stuff into netplay_frontend.c
2016-12-18 19:28:43 -05:00
Gregor Richards
28e331b5fd
Remove some magic numbers
2016-12-18 19:28:43 -05:00
Gregor Richards
6e6f2bfdbe
Use a proper password hash across the line.
2016-12-18 19:28:42 -05:00
Gregor Richards
763a657f82
Terrible first cut at password (sent in plain text D-8)
2016-12-18 19:28:42 -05:00
Gregor Richards
3631ff74ff
Very, very partial support for the server spectating
2016-12-18 19:28:42 -05:00
Gregor Richards
f6f9905ae3
Made remote pausing connection-specific
2016-12-18 19:28:42 -05:00
Gregor Richards
6556af1100
force_send_savestate is global again
...
We cannot send a savestate to only one player, as sending a savestate is
a synchronization event invalidating all prior input.
2016-12-18 19:28:42 -05:00
Gregor Richards
2130fd81a5
Fixed simulation for >2 players
2016-12-18 19:28:42 -05:00
Gregor Richards
e7ce01ad3b
More renaming
...
Now that remote_input_state isn't always remote, it should just be
called real_input_state (and is).
2016-12-18 19:28:42 -05:00
Gregor Richards
2cc8c5c467
Removing silly foo_ names used to help migration.
2016-12-18 19:28:42 -05:00
Gregor Richards
53c46530aa
Very first tidbits of true multiplayer support (minus actual multiple
...
players so far)
2016-12-18 19:28:42 -05:00
Gregor Richards
b5cd187077
Since there's now only one mode, removing netplay_callbacks entirely.
2016-12-18 19:28:42 -05:00
Gregor Richards
9b2270f5d4
Say goodbye to spectator mode (for now)
2016-12-18 19:28:42 -05:00
Gregor Richards
4768970d52
Moving force_send_savestate from netplay to connection.
2016-12-18 19:28:42 -05:00
Gregor Richards
ea722b49c8
Move other_addr from netplay to connection.
2016-12-18 19:28:42 -05:00
Gregor Richards
d1d29143b2
Move nickname field to connections. Spectate mode officially broken.
2016-12-18 19:28:42 -05:00
Gregor Richards
189cc6e5d6
Moving socket buffers to per-connection (currently breaks
...
delay_frames=0)
2016-12-18 19:28:42 -05:00
Gregor Richards
b334f04bd5
Removing RARCH_ from Netplay stall reasons.
2016-12-18 19:28:42 -05:00
Gregor Richards
1e1abf6951
First step of multiple connections. Still only one connection actually
...
works.
2016-12-18 19:28:42 -05:00
Gregor Richards
3908e25895
Separating local mode from remote mode.
2016-12-18 19:28:42 -05:00
Gregor Richards
80be19a7da
Renames for readability, merging frame and sram into sync packet.
2016-12-18 19:28:42 -05:00
Gregor Richards
f89e54fcb7
Now that we don't have to start at frame 0, use the server frame count
2016-12-18 19:28:42 -05:00
Gregor Richards
b3092f6fde
Moving things that shouldn't have been public into netplay_private.h
2016-12-18 19:28:41 -05:00
Gregor Richards
1c8f056239
Nonblocking initial connection. Haven't tested with delay_frames=0 yet
2016-12-18 19:28:41 -05:00
Gregor Richards
ba76528b8f
A more sophisticated status variable for later making the initial
...
connection nonblocking.
2016-12-18 19:28:39 -05:00
Gregor Richards
1214541410
Added packet buffer resizing to cope with initialization quirks.
2016-12-18 19:28:38 -05:00
Gregor Richards
900e5a79ec
Use nonblocking sockets for Netplay to avoid some stalls.
2016-12-18 19:28:38 -05:00
Gregor Richards
1245d1b5dd
Better netplay input simulation
...
In resimulation mode, we only copy the buttons. The reason for this
is nonobvious:
If we resimulated nothing, then the /duration/ with which any input
was pressed would be approximately correct, since the original
simulation came in as the input came in, but the /number of times/
the input was pressed would be wrong, as there would be an
advancing wavefront of real data overtaking the simulated data
(which is really just real data offset by some frames).
That's acceptable for arrows in most situations, since the amount
you move is tied to the duration, but unacceptable for buttons,
which will seem to jerkily be pressed numerous times with those
wavefronts.
2016-12-18 00:46:02 -05:00
Gregor Richards
0577749fae
Netplay LAN scanning is go! (sort of)
2016-12-02 22:40:26 -05:00
Gregor Richards
4c18cec752
Added Netplay discovery code (not yet in menu)
2016-12-02 19:49:42 -05:00
Gregor Richards
addff325d0
Netplay discovery LAN scanning task (incomplete)
2016-12-02 18:56:29 -05:00
Gregor Richards
22798e26c7
delay_frames naming consistency
...
Unifying all of the various inconsistent names of delay_frames into a
single name: delay_frames.
2016-12-01 13:34:37 -05:00
Gregor Richards
42da0a0184
NAT traversal in Netplay
...
For the time being, if NAT traversal is successful it simply announces
it as an OSD message. In the future it will be used to inform a
matchmaking server of the public port.
This patch also included minor fixes to the NAT traversal implementation
to make the select it demands actually doable.
2016-11-29 22:59:46 -05:00
Gregor Richards
225cbb387b
Updating netplay to use trans_stream for compression
2016-11-26 16:06:52 -05:00
Gregor Richards
da0b958aeb
Check HAVE_ZLIB and only do zlib compression if it's supported by both
...
sides.
2016-11-25 11:03:12 -05:00
Gregor Richards
9f03020af8
Change the netplay protocol version since compression isn't backwards
...
compatible.
2016-11-25 10:40:24 -05:00
Gregor Richards
53c6223dc6
Use zlib compression for savestates sent over netplay.
2016-11-25 10:40:24 -05:00
Gregor Richards
5c206c89f0
Add a netplay advertisement server for LAN netplay detection.
2016-10-10 11:52:54 -04:00
Gregor Richards
6c15c0de3d
Support for architecture-dependence serialization quirks in Netplay
...
As well as the implementation magic, we now send a platform magic in our
connection header. If the core reports platform dependence and the
platform magic differs relevantly, the connection will be refused.
Since netplay_send_info (client handshake) and netplay_get_info (server
handshake) were practically identical, they've also been merged into a
single netplay_handshake.
2016-10-05 21:12:42 -04:00
Gregor Richards
701cc5a18c
Splitting endian and other platform savestate quirks.
2016-10-04 23:07:36 -04:00
Gregor Richards
51683661e5
Changes to Netplay for the recent changes to quirks.
2016-10-04 23:07:36 -04:00
Gregor Richards
90bd741786
Switching serialization quirks to uint64_t for consistency with other
...
bitfields
2016-10-04 23:07:35 -04:00
Gregor Richards
07a4ad791d
Implemented Netplay initialization quirk
2016-10-04 23:07:35 -04:00
Gregor Richards
44931586b7
Removing Netplay workarounds which will soon be replaced by quirks
2016-10-04 23:06:50 -04:00
Gregor Richards
fcd57801bd
When we replay, resimulate input so that it doesn't judder between
...
remote states
2016-09-24 08:12:08 -04:00
Gregor Richards
42f8ed4338
Support for Netplay reconnection
...
In net server mode, when the client disconnects, the server now returns
to listening mode, in anticipation of the client reconnecting.
2016-09-21 22:37:43 -04:00
Gregor Richards
c2d9e7a538
Support for late connection to Netplay host mode
...
This changes netplay host mode's behavior in net (normal) mode from
immediately blocking to waiting for a connection while allowing the game
to run, like spectator mode.
2016-09-21 17:26:02 -04:00
Gregor Richards
851cd0fe6e
Removing now-unused BSV-related functions from Netplay
2016-09-20 22:32:23 -04:00
twinaphex
d7e9c198e6
Cleanups to netplay
2016-09-17 18:21:29 +02:00