[Qt-interest] QTcpSocket with QTextStream

Louis Hoefler louis.hoefler at gmx.de
Fri Aug 20 11:13:12 CEST 2010


I solved the "stop conversation" problem by inserting

a smtpsocket->flush() into the sendLine() function.

The warning about QSocketNotifier does still show up.

 

Can someone give me a hint what I need to modify to

remove that messages?

Also the smtpsocket->waitForReadyRead(Timeout)

function in run() never returns, only if I change the

Timeout to a value <= 100, why?

 

Thank you, Louis Hoefler.

 

Von: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Im Auftrag von Louis Hoefler
Gesendet: Freitag, 20. August 2010 10:34
An: qt-interest at trolltech.com
Betreff: Re: [Qt-interest] QTcpSocket with QTextStream

 

I think I found the error, I do execute read and write asynchronously. If
the server respondes with a bigger delay, I get errors.

 

Thank you, Louis Hoefler.

 

Von: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Im Auftrag von Louis Hoefler
Gesendet: Freitag, 20. August 2010 08:51
An: qt-interest at trolltech.com
Betreff: [Qt-interest] QTcpSocket with QTextStream

 

Hello everyone.

I use qt 4.6.3 with visual studio 2010.

 

I found a smtp class on the net, which is try to modify a little.

Sadly I get the error:

QSocketNotifier: socket notifiers cannot be enabled from another thread

and the conversation with the smtp server stops.

 

The error is shown after the function sendLine() is called from nextLine().

After that, nothing happens anymore.

Can someone tell me what I am doing wrong?

 

Thank you, Louis Hoefler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100820/33976b4e/attachment.html 


More information about the Qt-interest-old mailing list