goto-bus-stop / aocmultiny

[wip] Tiny NAT-traversing Age of Empires 2 Multiplayer client.
GNU General Public License v3.0
6 stars 1 forks source link

add basic libnice DirectPlay service provider + lots of other stuff #16

Closed goto-bus-stop closed 7 years ago

goto-bus-stop commented 8 years ago

Mostly copy-pasted from https://github.com/RazZziel/wine-dplay/blob/gsoc/dlls/dpwsockx/dpwsockx_main.c so far.

goto-bus-stop commented 8 years ago

Currently this assumes a signaling server that's used to exchange SDPs between every peer, so that's 7 SDPs per peer in an 8-player game. In DirectPlay, one player (the host probably) is the "name server" that keeps track of players. So perhaps a better option would be to connect everyone to the name server player, and to then exchange SDPs via the name server. The signaling server would only be needed to exchange messages between each joining player and the name server.

goto-bus-stop commented 8 years ago

lotsa cleanup going to need to happen here lmao

goto-bus-stop commented 8 years ago

So when joining, DirectPlay sends stuff to the host before a local player is created. That means that setting up the p2p connections during CreatePlayer doesn't quite work. Instead it should be like mentioned in https://github.com/goto-bus-stop/aocmultiny/pull/16#issuecomment-236419296. When opening a connection while joining, set up a direct connection to the host immediately. Will see what follows…

goto-bus-stop commented 7 years ago

Looks like currently it hangs because messages from the name server aren't being broadcast correctly (?). It hangs after the nameserver processed a joining REQUESTPLAYERID message, and the REQUESTPLAYERIDREPLY message doesn't reach the joining client, but is instead only processed by the host.