mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
Make address for proxies, BOB, SAM, ... configurable (#235).
This commit is contained in:
parent
a7da2423ce
commit
524a02cb0d
16 changed files with 112 additions and 72 deletions
11
SAM.cpp
11
SAM.cpp
|
@ -684,10 +684,13 @@ namespace client
|
|||
sockets.clear ();
|
||||
}
|
||||
|
||||
SAMBridge::SAMBridge (int port):
|
||||
m_IsRunning (false), m_Thread (nullptr),
|
||||
m_Acceptor (m_Service, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port)),
|
||||
m_DatagramEndpoint (boost::asio::ip::udp::v4 (), port-1), m_DatagramSocket (m_Service, m_DatagramEndpoint)
|
||||
SAMBridge::SAMBridge(const std::string& address, int port)
|
||||
: m_IsRunning (false), m_Thread (nullptr),
|
||||
m_Acceptor(m_Service, boost::asio::ip::tcp::endpoint(
|
||||
boost::asio::ip::address::from_string(address), port)
|
||||
),
|
||||
m_DatagramEndpoint(boost::asio::ip::address::from_string(address), port - 1),
|
||||
m_DatagramSocket(m_Service, m_DatagramEndpoint)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue