[Interest] Strange socket problem. QTcpSocket. Windows/Linux

Guido Seifert wargand at gmx.de
Mon Jan 27 07:35:05 CET 2014


Hi all. I have again a very strange problem. And again no sufficient information to share here or to
google. It might only be peripherally related to Qt. But perhaps someone recognizes this problem and
can give me a hint.

I am writing a UPnP application for Samsung TVs. This application writes UPnP commands to a Samsung
TV. I have two Samsung TVs for testing purposes. One D series and one E series. I write this program 
for Linux and Windows. The strange thing is, the Linux program works perfectly on the D and E series. 
On  Windows it works only for the E series. 

On Window the D series behaves strangely. I send a UPnP command to it and it responds... or not.
Totally unreliable. Very often I get a very unhelpful error message: QAbstractSocket::error = -1.
I can hammer the socket with the same data and sometimes I get after a while the correct response.

Now I checked with wireshark. Windows and Linux send exactly the same data. At least the ascii
part, which is the UPnP command. The data itself is correct. As I said: It always works for the
E series and from Linux it also works for the D series.

There must be something different how QTcpSocket opens a connection from Windows and from Linux.
Any ideas? 

Guido



More information about the Interest mailing list