mirror of https://github.com/oxen-io/lokinet
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.
19 lines
499 B
C++
19 lines
499 B
C++
#include <llarp/handlers/pyhandler.hpp>
|
|
namespace llarp
|
|
{
|
|
namespace handlers
|
|
{
|
|
void
|
|
PyHandler_Init(py::module& mod)
|
|
{
|
|
py::class_<PythonEndpoint, PythonEndpoint_ptr>(mod, "Endpoint")
|
|
.def(py::init<std::string, Context_ptr>())
|
|
.def("SendTo", &PythonEndpoint::SendPacket)
|
|
.def("OurAddress", &PythonEndpoint::GetOurAddress)
|
|
.def_readwrite("GotPacket", &PythonEndpoint::handlePacket);
|
|
}
|
|
|
|
} // namespace handlers
|
|
|
|
} // namespace llarp
|