MCPcopy Create free account
hub / github.com/deskflow/deskflow / bindNetworkInterface

Method bindNetworkInterface

src/lib/client/Client.cpp:635–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635void Client::bindNetworkInterface(IDataSocket *socket) const
636{
637 try {
638 if (const auto address = Settings::value(Settings::Core::Interface).toString(); !address.isEmpty()) {
639 LOG_DEBUG1("bind to network interface: %s", qPrintable(address));
640
641 NetworkAddress bindAddress(address.toStdString());
642 bindAddress.resolve();
643
644 socket->bind(bindAddress);
645 }
646 } catch (BaseException &e) {
647 LOG_WARN("%s", e.what());
648 LOG_WARN("operating system will select network interface automatically");
649 }
650}

Callers

nothing calls this directly

Calls 5

toStringMethod · 0.80
resolveMethod · 0.80
isEmptyMethod · 0.45
bindMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected