Questions tagged [qudpsocket]

The QUdpSocket class provides a UDP socket

UDP (User Datagram Protocol) is a lightweight, unreliable, datagram-oriented, connectionless protocol. It can be used when reliability isn't important. QUdpSocket is a subclass of QAbstractSocket that allows you to send and receive UDP datagrams.

74 questions
0
votes
1 answer

Qudpsocket readyread() don't work in try-catch block

I wanna get message by UDP protocol. If I create object to work with QUdpsocket in try-catch block, signal readyread() don't work. But if I created UDPworker's object out of try-catch block - all OK. What I did uncorrect in exceptions and Qt…
Konstantin
  • 25
  • 1
  • 1
  • 9
0
votes
1 answer

How to properly work with multiple QUdpSockets in Qt in a single Application

I have created a server and a client class, which are using UDP protocol. In my Application I have Instantiated 4 objects of Server and 4 objects of client with different Ports. The problem is I have send data to 4 servers from 4 clients in the same…
Ahmad Afkande
  • 137
  • 2
  • 14
0
votes
1 answer

ReadyRead Signal on QUdpSocket only emitted if bind method called first

Using PyQt4 and Qt4.1, Python 3.7.2, latest PyInstaller I have two applications (c++ and python) which communicate via udp localhost, port 2340 and port 2341) On both applications I am bounding the ports with…
raffro1337
  • 11
  • 2
0
votes
1 answer

Qt cant join multicast group of the specified networkInterface

I use QT5.6.3 on MACOS10.15. I have two ethernet interface. One is en0 , another one is en6. the en0's IP is 192.168.10.199, the en6'IP is 192.168.1.123. Now I need to receive multicast from en0 .the multicast group address 239.255.255.251 , the…
Lisan
  • 3
  • 2
0
votes
0 answers

Qudpsocket class usage

I am using QUdpSocket for reading multicast data coming on my machine My problem is that my machine has two Ethernet interfaces. One having network address 66.25.x.x and other 66.26.x.x I want to read data on both Ethernet interfaces which is…
Avni Gupta
  • 81
  • 1
  • 3
0
votes
2 answers

How to check Ethernet port connection status in Qt?

I am new to Qt .Actually, i want to check Whether the Ethernet is connected or not through qt application. For Example: when the Data is transfer from source to Destination through Ethernet. if i suddenly, remove the Ethernet cable my Qt application…
0
votes
2 answers

QUdpSocket - datagram is being received twice, why?

I am receiving a datagram twice on my QUdpSocket even though I am watching on wireshark and it is only received once. I create the socket and listen on port 11112. There is another device that emits data on this port which I am listening for. I…
0
votes
1 answer

PyQt5 QUdpSocket not binding to address and a port

def main(): app = QCoreApplication([]) local_ip = QHostAddress('192.168.43.126') port = 2359 udp_socket = QUdpSocket() b = QByteArray() b.append('i0000,0000') udp_socket.writeDatagram(b, QHostAddress('192.168.43.1'),…
0
votes
2 answers

UDP Listener in C not outputting correct hex information

I am trying to listen on a specific port (6053) and I want to print all of the data that is coming across that port. But I can't seem to get my program to run correctly, it outputs faulty data / incorrect data, as it does not match the data coming…
John
  • 1
  • 1
0
votes
1 answer

Qt - QUdpSocket bind failed constantly

I have these 2 lines of code. I need a socket that just receives data The first method is working, and I receive date (from the ip/port in the second method) The second method is always returning false. I don't understand the difference and can't…
LIOR
  • 149
  • 1
  • 12
0
votes
1 answer

QUdpSocket loses validity

I've a question regarding QUdpSocket: I'm receiving UDP messages on port 50011 to multicast address 239.0.0.1 about every 0.2 seconds (Proven by wireshark). The following code is working well (and printing "VALID" on every message) for ~ 1 minute.…
chrizbee
  • 145
  • 1
  • 13
0
votes
1 answer

Qt QUdpsocket audiostreaming

I am trying to clone the audio streaming model of QTCpsocket but now using QUdpsocket (virtual connection), though it looks like the code is being executed , nevertheless, effectively its not doing the job, I cant get streamed audio captured; Main…
Mohammad Kanan
  • 4,452
  • 10
  • 23
  • 47
0
votes
2 answers

Is calling qt udpsocket flush useful?

I am using the QUdpSocket to write reference data to a robot. I hope the transmission could be as real time as possible. Here is what I am doing now: if (dataBuffer.count() > 0) { int numWritten = udp_socket->writeDatagram(dataBuffer.left(64),…
Nyaruko
  • 4,329
  • 9
  • 54
  • 105
0
votes
1 answer

QUdp socket stop receiving packets in QT?

I have written code to receive UDP packets from a source. It works fine in the beginning. After receiving 'n' number of packets, it stops receiving packets from the connected ip and port. Note: i had checked that the udp socket is already in use and…
0
votes
1 answer

QUdpSocket reading issue

I have an issue when I receive data from a UDP client. The code that I used is: MyUDP::MyUDP(QObject *parent) : QObject(parent) { socket = new QUdpSocket(this); socket->bind(QHostAddress("192.168.1.10"),2000); connect(socket,…
IPSAteck
  • 3
  • 1