mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 12:17:49 +02:00
use uint16_t for ports
Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
parent
3af1f4bc76
commit
03cc6e0524
17 changed files with 102 additions and 96 deletions
|
@ -31,7 +31,7 @@ namespace client
|
|||
}
|
||||
|
||||
I2PTunnelConnection::I2PTunnelConnection (I2PService * owner, std::shared_ptr<boost::asio::ip::tcp::socket> socket,
|
||||
std::shared_ptr<const i2p::data::LeaseSet> leaseSet, int port):
|
||||
std::shared_ptr<const i2p::data::LeaseSet> leaseSet, uint16_t port):
|
||||
I2PServiceHandler(owner), m_Socket (socket), m_RemoteEndpoint (socket->remote_endpoint ()),
|
||||
m_IsQuiet (true)
|
||||
{
|
||||
|
@ -581,7 +581,7 @@ namespace client
|
|||
{
|
||||
public:
|
||||
I2PClientTunnelHandler (I2PClientTunnel * parent, std::shared_ptr<const Address> address,
|
||||
int destinationPort, std::shared_ptr<boost::asio::ip::tcp::socket> socket):
|
||||
uint16_t destinationPort, std::shared_ptr<boost::asio::ip::tcp::socket> socket):
|
||||
I2PServiceHandler(parent), m_Address(address),
|
||||
m_DestinationPort (destinationPort), m_Socket(socket) {};
|
||||
void Handle();
|
||||
|
@ -589,7 +589,7 @@ namespace client
|
|||
private:
|
||||
void HandleStreamRequestComplete (std::shared_ptr<i2p::stream::Stream> stream);
|
||||
std::shared_ptr<const Address> m_Address;
|
||||
int m_DestinationPort;
|
||||
uint16_t m_DestinationPort;
|
||||
std::shared_ptr<boost::asio::ip::tcp::socket> m_Socket;
|
||||
};
|
||||
|
||||
|
@ -630,7 +630,7 @@ namespace client
|
|||
}
|
||||
|
||||
I2PClientTunnel::I2PClientTunnel (const std::string& name, const std::string& destination,
|
||||
const std::string& address, int port, std::shared_ptr<ClientDestination> localDestination, int destinationPort):
|
||||
const std::string& address, uint16_t port, std::shared_ptr<ClientDestination> localDestination, uint16_t destinationPort):
|
||||
TCPIPAcceptor (address, port, localDestination), m_Name (name), m_Destination (destination),
|
||||
m_DestinationPort (destinationPort), m_KeepAliveInterval (0)
|
||||
{
|
||||
|
@ -705,10 +705,10 @@ namespace client
|
|||
}
|
||||
|
||||
I2PServerTunnel::I2PServerTunnel (const std::string& name, const std::string& address,
|
||||
int port, std::shared_ptr<ClientDestination> localDestination, int inport, bool gzip):
|
||||
uint16_t port, std::shared_ptr<ClientDestination> localDestination, uint16_t inport, bool gzip):
|
||||
I2PService (localDestination), m_IsUniqueLocal(true), m_Name (name), m_Address (address), m_Port (port), m_IsAccessList (false)
|
||||
{
|
||||
int inPort = (inport ? inport : port);
|
||||
uint16_t inPort = (inport ? inport : port);
|
||||
m_PortDestination = localDestination->GetStreamingDestination (inPort);
|
||||
if (!m_PortDestination) // default destination
|
||||
m_PortDestination = localDestination->CreateStreamingDestination (inPort, gzip);
|
||||
|
@ -870,8 +870,8 @@ namespace client
|
|||
}
|
||||
|
||||
I2PServerTunnelHTTP::I2PServerTunnelHTTP (const std::string& name, const std::string& address,
|
||||
int port, std::shared_ptr<ClientDestination> localDestination,
|
||||
const std::string& host, int inport, bool gzip):
|
||||
uint16_t port, std::shared_ptr<ClientDestination> localDestination,
|
||||
const std::string& host, uint16_t inport, bool gzip):
|
||||
I2PServerTunnel (name, address, port, localDestination, inport, gzip),
|
||||
m_Host (host)
|
||||
{
|
||||
|
@ -883,8 +883,8 @@ namespace client
|
|||
}
|
||||
|
||||
I2PServerTunnelIRC::I2PServerTunnelIRC (const std::string& name, const std::string& address,
|
||||
int port, std::shared_ptr<ClientDestination> localDestination,
|
||||
const std::string& webircpass, int inport, bool gzip):
|
||||
uint16_t port, std::shared_ptr<ClientDestination> localDestination,
|
||||
const std::string& webircpass, uint16_t inport, bool gzip):
|
||||
I2PServerTunnel (name, address, port, localDestination, inport, gzip),
|
||||
m_WebircPass (webircpass)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue