[Qt-interest] Using QUdpSocket fails across internet

Frederico A. M. Prado famprado at terra.com.br
Tue Jan 26 04:02:28 CET 2010


You may be behind a router.

There is such a thing as a UDP connection. UDP is a connectionless  
protocol. You just send the package and hope that it reaches the target.  
There is no handshake and no connection is established. If you are behind  
a router the router will most likely change your output port to one of its  
available ports and when it receives the response it won't know where it  
should relay it to, as there is no connection, thus blocking the returning  
packages.

If that is the problem, and you have access to the router you can  
configure it to forward any UDP packaged received in a given port to the  
correct IP in your local network. That should solve the problem.

If you are behind a corporation firewall it may be trickier. You may be  
unable to receive or even send any UDP package except in specific ports.  
You would need to contact the people responsible for the firewall to solve  
the problem then.

I hope this helps,

Fred

On Tue, 26 Jan 2010 00:40:05 -0200, David Boosalis  
<david.boosalis at gmail.com> wrote:

> I am using QUdpSocket on both the server and the client.  If both the  
> client
> and server are on the same sub-domain they work just fine, but when I try
> the codes across the internet no packets are received by the client (A
> connection is made however).  Is there any tricks for getting  
> QUdpSockets to
> work across the internet
>
> Any advise appreciated.
>
> -David




More information about the Qt-interest-old mailing list