[Qt-interest] Why Bus error clientSocket->waitForConnected()?

Gabriele Kahlout gabriele at mysimpatico.com
Sun May 2 11:52:26 CEST 2010


I don't understand
waitForNewConnection() is an alternative to listen() or should the former go
after the latter, as in my code?Without listen() there is no way to set the
listening HostAdress and port for the tcpServer.


2010/5/2 Kustaa Nyholm <Kustaa.Nyholm at planmeca.com>

>
> >http://doc.qt.nokia.com/4.6/qiodevice.html#readLine
> >
> >The word "blocking" doesn't appear in that documentation.
>
> Which says:
>
> Data is read until either of the following conditions are met:
>
> The first '\n' character is read.
> maxSize - 1 bytes are read.
> The end of the device data is detected.
>
> So my knee jerk reading would be that it should block, but I guess
> it depends on what "end of the device data" means. I would have
> thought that it means the stream is at end but if it means that
> there is no more data available *momentarily*, then it should not
> block of course.
>
> But a readLine that terminates early just because not enough
> data has arrived in time seems pretty useless to me, I would
> *always*  have to wrap this in a loop that checks for a complete
> line having being received. Does not make sense to me.
>
> br Kusti
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Regards,
K. Gabriele

--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer OR with
" ACK" appended to this subject within 48 hours. Otherwise, I might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x, this)
∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).

Also note that correspondence may be received only from specified a priori
senders, or if the subject of this email ends with a code, eg. -LICHT01X,
then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y. In(y,
subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100502/df941d4c/attachment.html 


More information about the Qt-interest-old mailing list