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

Can I use QUdpSocket to conect with QTcpServer?

I am super new to the networking world, so I have a QTcpserver that's currently working with the newConnection signal, but I was wondering if I could use QUdpSocket with a QTcpServer ? It's this possible at all ?
SSM89
  • 333
  • 1
  • 3
  • 10
0
votes
1 answer

Send struct via UDP without serialization

I would like to send a struct : typedef struct myStruct { int nb_trame; bool tabBool[20]; } myStruct; via a QUpdSocket. I would like to not serialize it (so please no answer with QDataStream... ^^). Will this work ? : myStruct…
0xPunt
  • 313
  • 1
  • 4
  • 21
0
votes
1 answer

QUdpSocket : I'm receiving a struct, how do I use it?

via a QUdpSocket, I know I'll receive datas which will contain only this struct: typedef struct myStruct { int nb_trame; std::vector vBool; } myStruct; but when I receive new datas, I receive a QByteArray right ? So how…
0xPunt
  • 313
  • 1
  • 4
  • 21
0
votes
1 answer

Is It possible to exchange QVector via UDP?

I would like to send via a QUdpSocket 2 or 3 QVector : One QVector < bool > One QVector < int > One QVector < float > Is it possible to do that, and if so how to do it ?
0xPunt
  • 313
  • 1
  • 4
  • 21
0
votes
0 answers

Sending UDP datagrams using QUdpSocket and QDatastream

The program is able to send .txt files. But any other filetype gets corrupted. I think it has something to do with the datatypes I store my frames in. Sorry for the long post i just have no idea where my problem might be. I'm new to QT as well as…
0
votes
0 answers

How to use signals in ActiveX (ActiveQt) controls

I'm trying to modify activeQt/wrapper example code from Qt to recive Udp packets. I want to build ActiveX control and put it in C# frameWindowApplication #include #include #include #include…
radio_f8
  • 33
  • 6
0
votes
1 answer

Qt Write to UDP Socket on Linux Machine and Windows Read from Socket with Python

=========== UPDATE: =========== I am now using the broadcast ip 10.6.0.3 and a higher port, 57890. I can see the traffic in Windows Network Monitor but still cannot get Python to read it. ============================== I have a linux machine writing…
PhilBot
  • 748
  • 18
  • 85
  • 173
0
votes
1 answer

QUdpSocket setSockOpt

I have some old code, which use this flags in socket: unsigned char str_optval [8] = {0xfc, 0x08, 0xff, 0x33, 0xcc, 0xff, 0xaa, 0x0}; res=setsockopt(sid,SOL_IP,IP_OPTIONS, (char*)&str_optval,sizeof(str_optval)); How can I change this place to use…
0
votes
0 answers

QUdpSocket, how can I read broadcast messages from 192.168.0.x while I am on 192.168.1.x

I am trying to capture some test broadcast messages from 192.168.0.xxx while I am at 192.168.1.xxx I have a device that sends broadcast test packets from 192.168.0.1 to 192.168.0.255. My application is on 192.168.1.70 and trying to receive the…
Rob Dugas
  • 1
  • 1
0
votes
1 answer

qudpsocket multicast root privileges

I've written a simple udp multicast server using QUdpSocket but the writedatagram function only works if I run the app with root privileges. Is this normal? It's a pain. Plus iperf (for example) seems to work without root privileges. What am I doing…
kingrolo
  • 2,857
  • 2
  • 16
  • 11
0
votes
1 answer

cannot read from QUdpSocket client

I send command to a system and read response from it. My machine is client, I write a packet successfully to server, however, I cannot receive the response from it. I am wondering why this happens, please have a look at my code: (server address is…
Sam
  • 813
  • 2
  • 16
  • 30
0
votes
1 answer

service block eìapplication execution

hello I've a problem with services. I'm making an application that implements an UDPServer and log in main activity the received packet. I want that the service starts even if the activity was closed so I think that I must to use Service. Is it…
Dabidi
  • 397
  • 5
  • 14
0
votes
2 answers

How do I know the sending port number in QUdpSocket?

Is there a way I can get the port number the udp socket used to send message? What I want to do is to send a udp datagram to someone and listen to that sending port. For example in the following code: QUdpSocket *s = new…
user1475966
  • 79
  • 1
  • 4
0
votes
2 answers

How to specify the network interface for a QUdpSocket to use?

I have an application that uses QUdpSocket to send broadcast packets. The machine sending the packets has several network interfaces. Unfortunately, I haven't been able to figure out how to get QUdpSocket to use the right network interface. Is there…
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
1 2 3 4
5