Commit 99528628 authored by Committed by Katharina Fey
netmod-tcp: implement limited client-server connections
By default connections are greated bi-directionally between two peers. This has the advantage of being able to read and write at the same time, but might not be suported on all networks. As a fallback this commit implements reverse connection logic via the same stream as an incoming connection. A user can specify a peer in the peer list with "limited" connection mode (example: 10.20.30.40:1312 limited), which will indicate in the opening handshake to the server to re-use the incoming TcpStream as the outgoing stream to the peer. This way clients that can't be reached via an open upnp port (because their network doesn't support this) can still use netmod-tcp to peer.
Showing with 140 additions and 49 deletions