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/pybind/llarp/handlers/pyhandler.cpp

18 lines
467 B
C++

4 years ago
#include "llarp/handlers/pyhandler.hpp"
namespace llarp
{
4 years ago
namespace handlers
{
void
PyHandler_Init(py::module & mod)
{
4 years ago
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
}