Closed goto-bus-stop closed 7 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.
lotsa cleanup going to need to happen here lmao
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…
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.
Mostly copy-pasted from https://github.com/RazZziel/wine-dplay/blob/gsoc/dlls/dpwsockx/dpwsockx_main.c so far.