lokinet/llarp/utp/utp.cpp

36 lines
1.2 KiB
C++
Raw Normal View History

2019-03-29 14:23:19 +00:00
#include <utp/utp.hpp>
#include <router/abstractrouter.hpp>
2019-06-02 21:19:10 +00:00
#include <util/memfn.hpp>
#include <utp/linklayer.hpp>
2019-03-26 19:30:10 +00:00
namespace llarp
{
namespace utp
{
2019-05-15 16:15:20 +00:00
LinkLayer_ptr
2019-07-28 15:33:18 +00:00
NewOutboundLink(const SecretKey& routerEncSecret, GetRCFunc getrc,
2019-08-07 16:33:29 +00:00
LinkMessageHandler h, SignBufferFunc sign,
SessionEstablishedHandler est,
SessionRenegotiateHandler reneg, TimeoutHandler timeout,
SessionClosedHandler closed)
{
return std::make_shared< LinkLayer >(routerEncSecret, getrc, h, sign, est,
reneg, timeout, closed, false);
}
LinkLayer_ptr
NewInboundLink(const SecretKey& routerEncSecret, GetRCFunc getrc,
2019-08-07 16:33:29 +00:00
LinkMessageHandler h, SignBufferFunc sign,
SessionEstablishedHandler est,
SessionRenegotiateHandler reneg, TimeoutHandler timeout,
SessionClosedHandler closed)
{
return std::make_shared< LinkLayer >(routerEncSecret, getrc, h, sign, est,
reneg, timeout, closed, true);
}
} // namespace utp
} // namespace llarp