mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
read more than 1 udp packet
This commit is contained in:
parent
9286e4794b
commit
3d07ddfba5
|
@ -697,8 +697,13 @@ namespace client
|
||||||
|
|
||||||
void I2PUDPClientTunnel::HandleRecvFromLocal(const boost::system::error_code & ec, std::size_t transferred)
|
void I2PUDPClientTunnel::HandleRecvFromLocal(const boost::system::error_code & ec, std::size_t transferred)
|
||||||
{
|
{
|
||||||
|
if(ec) {
|
||||||
|
LogPrint(eLogError, "UDP Client: ", ec.message());
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!m_RemoteIdent) {
|
if(!m_RemoteIdent) {
|
||||||
LogPrint(eLogWarning, "UDP Client: remote endpoint not resolved yet");
|
LogPrint(eLogWarning, "UDP Client: remote endpoint not resolved yet");
|
||||||
|
RecvFromLocal();
|
||||||
return; // drop, remote not resolved
|
return; // drop, remote not resolved
|
||||||
}
|
}
|
||||||
auto remotePort = m_RecvEndpoint.port();
|
auto remotePort = m_RecvEndpoint.port();
|
||||||
|
@ -712,6 +717,7 @@ namespace client
|
||||||
m_LocalDest->GetDatagramDestination()->SendDatagramTo(m_RecvBuff, transferred, *m_RemoteIdent, remotePort, RemotePort);
|
m_LocalDest->GetDatagramDestination()->SendDatagramTo(m_RecvBuff, transferred, *m_RemoteIdent, remotePort, RemotePort);
|
||||||
// mark convo as active
|
// mark convo as active
|
||||||
m_Sessions[remotePort].second = i2p::util::GetMillisecondsSinceEpoch();
|
m_Sessions[remotePort].second = i2p::util::GetMillisecondsSinceEpoch();
|
||||||
|
RecvFromLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::shared_ptr<DatagramSessionInfo> > I2PUDPClientTunnel::GetSessions()
|
std::vector<std::shared_ptr<DatagramSessionInfo> > I2PUDPClientTunnel::GetSessions()
|
||||||
|
|
Loading…
Reference in a new issue