mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-09 13:10:25 +00:00
635dc4fe13
llarp/config/config.cpp: respect [network]:type option llarp/handlers/exit.cpp: when [network]:type is null dont init tun interface llarp/service/context.cpp: respect [network]:type option change endpoint name back to "default" llarp/tooling/router_hive.cpp: dont use LogicCall for obtaining RCs from underlying relays, it crashes the mainloop and it's probably safe to readonly access RCs. pybind/common.hpp: remove typecasters as we use C++17 now pybind/llarp/config.cpp: remove SnappConfig wire up NetworkConfig pybind/llarp/handlers/pyhandler.hpp: remove SnappConfig from constructor pybind/llarp/handlers/pyhandler.cpp: update constructor implementation to match header test/hive/hive.py: remove broke endpoint related code wire up null endpoint option using NetworkConfig use index at 0 for relays and clients instead of 1 dont add a python endpoint to all clients
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
|