K
K
Kalombyr2020-10-21 19:00:16
Qt
Kalombyr, 2020-10-21 19:00:16

Two programs on one UPD port, how to send before the next one after reading the data?

Good evening!
There is a certain program that communicates with the equipment via UDP.
I need to read data (no write).
The program opens the address and port: 0.0.0.0:15000
I, accordingly, do the same in Qt: bind(QHostAddress::AnyIPv4, 15000, (QUdpSocket::ShareAddress | QUdpSocket::QUdpSocket::ReuseAddressHint)) and subscribe to the event of the availability of new connect(ns, &QUdpSocket::readyRead, .....) data and read everything that is readDatagram(...).

The problem is that, as I understand it, this data no longer reaches the program. She keeps the port open, I was convinced.
The question is how to proceed then?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel K, 2020-10-22
@Kalombyr

Binding flags must be the same for both programs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question