1

I have QUdpsSocket in worker thread. How I should send incoming data (pointer, qbytearray, copy uint8_t[], ..?) to main thread? And where I should delete it?

It's about 6000 packet per second in local network (average 2mb/sec), and I have no access to change default udp input buffer size. So, receive data in another thread is the way to lose minimum count of packets (if some load in main thread).

Damamaty
  • 65
  • 5
  • you can look for ideas here: http://stackoverflow.com/questions/11284898/sending-large-amount-of-data-between-qt-threads – prajmus Jan 17 '14 at 22:21

1 Answers1

0

You could use a signal from the receiving thread to the main thread that passes a pointer to your received data. You could then free the memory in the main thread.

aludwig1
  • 100
  • 7