mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-25 00:25:36 +02:00
Add support for multiple udp server tunnels on one destionation
This commit is contained in:
parent
c5a1806528
commit
5b93558bd0
6 changed files with 143 additions and 57 deletions
libi2pd_client
|
@ -105,7 +105,7 @@ namespace client
|
|||
void HandleRecvFromI2PRaw (uint16_t fromPort, uint16_t toPort, const uint8_t * buf, size_t len);
|
||||
UDPSessionPtr ObtainUDPSession (const i2p::data::IdentityEx& from, uint16_t localPort, uint16_t remotePort);
|
||||
uint32_t GetSessionIndex (uint16_t fromPort, uint16_t toPort) const { return ((uint32_t)fromPort << 16) + toPort; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool m_IsUniqueLocal;
|
||||
|
@ -116,6 +116,7 @@ namespace client
|
|||
std::unordered_map<uint32_t, UDPSessionPtr> m_Sessions; // (from port, to port)->session
|
||||
std::shared_ptr<i2p::client::ClientDestination> m_LocalDest;
|
||||
UDPSessionPtr m_LastSession;
|
||||
uint16_t m_inPort;
|
||||
bool m_Gzip;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue