Remove duplicate method

Not sure why this was here, but AFAICT it is identical to
`add_request_command` without the `_ex`.
This commit is contained in:
Jason Rhinelander 2021-06-19 22:57:03 -03:00
parent 2805d01f6b
commit 959df9c5dd
1 changed files with 0 additions and 31 deletions

View File

@ -178,37 +178,6 @@ namespace oxenmq
msg.send_reply(result);
});
})
.def("add_request_command_ex",
[](OxenMQ &self,
std::string category,
std::string name,
py::function handler)
{
self.add_request_command(category, name,
[handler](Message & msg) {
std::string result;
{
py::gil_scoped_acquire gil;
std::vector<py::bytes> data;
for (auto& arg : msg.data)
{
data.emplace_back(arg.begin(), arg.size());
}
try
{
const auto obj = handler(data, msg);
result = py::str(obj);
}
catch(std::exception & ex)
{
PyErr_SetString(PyExc_RuntimeError, ex.what());
}
}
msg.send_reply(result);
});
})
.def("connect_remote",
[](OxenMQ & self,
std::string remote) -> ConnectionID