T
T
tschin2016-05-03 12:45:06
linux
tschin, 2016-05-03 12:45:06

How to send a broadcast udp packet to 255.255.255.255 in qt?

Hello!
There is a network with a mask of 255.255.255.0, there is a Debian 6 machine running an application written in qt that sends a broadcast udp packet.
If the address is set as 192.168.5.255, then everything is fine, broadcast is sent, if the address is 255.255.255.255, then the send function returns -1.
In the program for working with udp I use QUdpSocket, qt 4.7.4 The
question is, is it possible to force the program to send a broadcast packet to 255.255.255.255 with a subnet mask of 255.255.255.0?
In Windows, it seems, with similar network settings, packets are sent to 255.255.255.255 ...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question