Compare commits
2 Commits
4f83614037
...
40b85488dc
| Author | SHA1 | Date |
|---|---|---|
|
|
40b85488dc | |
|
|
7584563002 |
|
|
@ -8,6 +8,7 @@ namespace icsneo {
|
||||||
|
|
||||||
void init_messagefilter(pybind11::module_& m) {
|
void init_messagefilter(pybind11::module_& m) {
|
||||||
pybind11::class_<MessageFilter, std::shared_ptr<MessageFilter>>(m, "MessageFilter")
|
pybind11::class_<MessageFilter, std::shared_ptr<MessageFilter>>(m, "MessageFilter")
|
||||||
|
.def(pybind11::init())
|
||||||
.def(pybind11::init<Network::NetID>());
|
.def(pybind11::init<Network::NetID>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,21 @@ void TCP::Socket::poll(uint16_t event, uint32_t msTimeout) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCP::Find(std::vector<FoundDevice>& found) {
|
void TCP::Find(std::vector<FoundDevice>& found) {
|
||||||
|
static const auto tcpDisabled = []() -> bool {
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 4996)
|
||||||
|
#endif
|
||||||
|
const auto disabled = std::getenv("LIBICSNEO_DISABLE_TCP");
|
||||||
|
return disabled ? std::stoi(disabled) : false;
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
if(tcpDisabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static const auto MDNS_PORT = htons((unsigned short)5353);
|
static const auto MDNS_PORT = htons((unsigned short)5353);
|
||||||
static const auto MDNS_IP = htonl((((uint32_t)224U) << 24U) | ((uint32_t)251U));
|
static const auto MDNS_IP = htonl((((uint32_t)224U) << 24U) | ((uint32_t)251U));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue