mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-11-14 05:20:10 +00:00
read UDP associate socket until close
This commit is contained in:
parent
689a35c142
commit
aafaebc560
1 changed files with 3 additions and 2 deletions
|
|
@ -686,20 +686,21 @@ namespace proxy
|
||||||
{
|
{
|
||||||
if (!ecode)
|
if (!ecode)
|
||||||
{
|
{
|
||||||
if (Kill()) return;
|
|
||||||
if (m_cmd == CMD_CONNECT)
|
if (m_cmd == CMD_CONNECT)
|
||||||
{
|
{
|
||||||
|
if (Kill()) return;
|
||||||
LogPrint (eLogInfo, "SOCKS: New I2PTunnel connection");
|
LogPrint (eLogInfo, "SOCKS: New I2PTunnel connection");
|
||||||
auto connection = std::make_shared<i2p::client::I2PTunnelConnection>(GetOwner(), m_sock, m_stream);
|
auto connection = std::make_shared<i2p::client::I2PTunnelConnection>(GetOwner(), m_sock, m_stream);
|
||||||
GetOwner()->AddHandler (connection);
|
GetOwner()->AddHandler (connection);
|
||||||
connection->I2PConnect (m_remaining_data,m_remaining_data_len);
|
connection->I2PConnect (m_remaining_data,m_remaining_data_len);
|
||||||
|
Done(shared_from_this());
|
||||||
}
|
}
|
||||||
else if (m_cmd == CMD_UDP && m_UDPTunnel)
|
else if (m_cmd == CMD_UDP && m_UDPTunnel)
|
||||||
{
|
{
|
||||||
LogPrint (eLogInfo, "SOCKS: Start UDP tunnel");
|
LogPrint (eLogInfo, "SOCKS: Start UDP tunnel");
|
||||||
m_UDPTunnel->Start ();
|
m_UDPTunnel->Start ();
|
||||||
|
AsyncSockRead (); // associate socket
|
||||||
}
|
}
|
||||||
Done(shared_from_this());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue