You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp/handlers/null.hpp

43 lines
898 B
C++

#ifndef LLARP_HANDLERS_NULL_HPP
#define LLARP_HANDLERS_NULL_HPP
#include <service/endpoint.hpp>
namespace llarp
{
namespace handlers
{
struct NullEndpoint final
: public llarp::service::Endpoint,
public std::enable_shared_from_this< NullEndpoint >
{
NullEndpoint(const std::string &name, AbstractRouter *r,
llarp::service::Context *parent)
: llarp::service::Endpoint(name, r, parent)
{
}
bool
HandleInboundPacket(const service::ConvoTag, const llarp_buffer_t &,
service::ProtocolType) override
{
return true;
}
path::PathSet_ptr
GetSelf() override
{
return shared_from_this();
}
5 years ago
bool
SupportsV6() const override
{
return false;
}
};
} // namespace handlers
} // namespace llarp
#endif