Example #1
0
MDNS::MDNS() {
    connect (&m_IPv4_receiver, SIGNAL (readyRead()), this, SLOT (readIPv4Socket()));
    connect (&m_IPv6_receiver, SIGNAL (readyRead()), this, SLOT (readIPv6Socket()));

    m_IPv4_receiver.bind (5353, QUdpSocket::ShareAddress);
    m_IPv6_receiver.bind (5353, QUdpSocket::ShareAddress);
}
Example #2
0
MDNS::MDNS() {
    connect (&m_IPv4_receiver, SIGNAL (readyRead()), this, SLOT (readIPv4Socket()));
    connect (&m_IPv6_receiver, SIGNAL (readyRead()), this, SLOT (readIPv6Socket()));

    QUdpSocket::BindFlag flag = QUdpSocket::ShareAddress;
    m_IPv6_receiver.bind (QHostAddress ("FF02::FB"),    5353, flag);
    m_IPv4_receiver.bind (QHostAddress ("224.0.0.251"), 5353, flag);
}