Changes between Initial Version and Version 1 of Ticket #2305, comment 20


Ignore:
Timestamp:
Aug 28, 2016, 7:38:51 PM (8 years ago)
Author:
fcxSanya

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2305, comment 20

    initial v1  
    11Attached an early unfinished version of STK-derived STUN code integration: it doesn't work nor compiles yet, and STK-derived code has to be rewritten using 0 A.D. libraries/data structures/approaches/conventions/etc. The patch in the current state only outlines the planned integration (what code should go where).
    22
    3 In the current lobby implementation, host's port is configured in match setup and sent in the register game stanza, IP is detected by an ejabberd plugin and inserted into the game record. The simplest way to integrate STUN (the one I used in the attached patch) is to include STUN endpoint into the same register game stanza / lobby game record besides the 'normal' one (aforementioned IP + port), this way STUN-based code is closer to the existing network implementation (for both lobby-based matchmaking and direct connection).
     3In the current lobby implementation, host's port is configured in match setup and is sent in the register game stanza, IP is detected by an ejabberd plugin and inserted into the game record. The simplest way to integrate STUN (the one I used in the attached patch) is to include STUN endpoint into the same register game stanza / lobby game record besides the 'normal' one (aforementioned IP + port), this way STUN-based code is closer to the existing network implementation (for both lobby-based matchmaking and direct connection).
    44
    55Another possible option is to publish only JID (rather than IP + port) in the game list, in this case before connecting to host, a client should exchange XMPP messages with it to discover available endpoint(s). This is the way ICE works.