mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
create datagram destination for DATAGRAM session
This commit is contained in:
parent
2a23537dbd
commit
39641f05b9
15
SAM.cpp
15
SAM.cpp
@ -253,16 +253,15 @@ namespace client
|
|||||||
if (m_Session)
|
if (m_Session)
|
||||||
{
|
{
|
||||||
m_SocketType = eSAMSocketTypeSession;
|
m_SocketType = eSAMSocketTypeSession;
|
||||||
if (m_Session->localDestination->IsReady ())
|
if (style == SAM_VALUE_DATAGRAM)
|
||||||
{
|
{
|
||||||
if (style == SAM_VALUE_DATAGRAM)
|
auto dest = m_Session->localDestination->CreateDatagramDestination ();
|
||||||
{
|
dest->SetReceiver (std::bind (&SAMSocket::HandleI2PDatagramReceive, shared_from_this (),
|
||||||
auto dest = m_Session->localDestination->CreateDatagramDestination ();
|
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
|
||||||
dest->SetReceiver (std::bind (&SAMSocket::HandleI2PDatagramReceive, shared_from_this (),
|
|
||||||
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5));
|
|
||||||
}
|
|
||||||
SendSessionCreateReplyOk ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_Session->localDestination->IsReady ())
|
||||||
|
SendSessionCreateReplyOk ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_Timer.expires_from_now (boost::posix_time::seconds(SAM_SESSION_READINESS_CHECK_INTERVAL));
|
m_Timer.expires_from_now (boost::posix_time::seconds(SAM_SESSION_READINESS_CHECK_INTERVAL));
|
||||||
|
Loading…
Reference in New Issue
Block a user