• Juan Batiz-Benet's avatar
    p2p/host: nat manager · 6e598fdf
    Juan Batiz-Benet authored
    this commit moves management of the nat to its own object.
    perhaps this can be general enough to work with any host
    (not just BasicHost), but for now keeping here.
    
    the nat manager:
    - discovers and sets up the nat asynchronously.
    - adds any port mappings necessary if/after nat has been found.
    - listens to the network Listen() changes, adding/closing mappings
    6e598fdf
natmgr.go 6.78 KB