[Interest] TCP ACK with QDataStream -- OR: disconnect race condition detection

Constantin Makshin cmakshin at gmail.com
Sun Sep 9 21:14:28 CEST 2012


AFAIK, that numbering is done by the OS itself and is not intended to be
accessed/used by applications.

On 09/09/2012 10:54 PM, d3fault wrote:
> Haha, funny. Reliable doesn't mean reliable. Who knew...
> 
> Are you sure it isn't just Qt failing to utilize the TCP protocol
> correctly? I don't mean to question your expertise, as you sound like
> you know what you're talking about, but this quote from wikipedia
> makes it sound like TCP does in fact do mid-stream reliability: "TCP
> primarily uses a cumulative acknowledgment scheme, where the receiver
> sends an acknowledgment signifying that the receiver has received all
> data preceding the acknowledged sequence number" [0]. That plus
> automatic re-transmission of lost packets sounds like exactly what I
> want! How do I get that number in a platform independent manner [and
> make sense of it]?
> 
> 
> I was going to code my own ack layer on top of TCP... but after a few
> designs and reading further into TCP it sounded an awful lot like
> reinventing the wheel. I came up with my own sequence number scheme
> and everything and oh boy TCP really sucks if you're right :-P...
> 
> 
> 
> An actually-reliable-tcp-socket class (called something else, and
> perhaps based on QAbstractSocket instead?) sounds like it would make a
> great addition to Qt don't you think? Maybe something along the lines
> of QNetworkRequest::Acknowledged() [signal].... though not necessarily
> anything to do with QNAM (especially since the QNetworkReply makes a
> better acknowledgement in that case lol (and now I'm just confusing
> myself)).
> 
> 
> [0] - http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Reliable_transmission

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120909/4248fe27/attachment.sig>


More information about the Interest mailing list