[Qt-interest] slot connected to QAbstractSocket::QIODevice::readyRead () recieves multiple responses at once

Thomas Richards thomas.richards at pebble.tv
Wed Apr 15 14:39:44 CEST 2009


Hi,

> Well Two non-Qt Question and 1 Qt Question:
> is it Mandatory for a Protocol to end all of its messages with CRLF or
with
> any Specified tailer
> 

Not at all. Some protocols have different delimiting characters, and
others don't have any such character at all - some rely on separate
"message byte count" information, usually packed in to the start of each
message. It depends on the protocol in question.

> If a big response is splitted into multiple messages would they have
the same
> Acknowledgement Number
> 

No, but now you're talking about stuff at a lower protocol level...

> will bytesAvailable() methods return the size of first message or all
messages
> currently stored in the buffer in the above mentioned Scenario.

The latter - bytesAvailable() returns the total size of the data in the
receive buffer, which may be one protocol "message", or multiple
messages, or perhaps even less than one message, your mileage may vary. 

I hope this helps.


Cheers,

-- 
Thomi Richards




More information about the Qt-interest-old mailing list