Results 1 to 17 of 17

Thread: QTcpSocket write data with packet loss - Idiot proof sample does not work!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Join Date
    Jun 2011
    Posts
    12
    Thanks
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: QTcpSocket write data with packet loss - Idiot proof sample does not work!

    Quote Originally Posted by wysota View Post
    it is important what terms you use to refer to protocol data units -- "packets" are data units of the network layer (i.e. Internet Protocol (IP)), "segments" are data units of the TCP protocol (transport layer), let's not mix the two.
    Ok, I mean segments, or my data chunks. Now I confirm that "missed" data is the last segment sent. You right about that. Thank you.

    Quote Originally Posted by wysota View Post
    It doesn't mean you are reading any data. We only know it sits in your socket.
    Now I changed the server code and actually read all available bytes but all the same happens.

    Again, when I try dd if=./tcp.bin > /dev/tcp/<server_ip>/<server_port> everything is fine. So, server side is just fine. The problem is on client side.

    tcpDump2.jpg

    Quote Originally Posted by wysota View Post
    The code will simply fail to work e.g. in a case where the data you're trying to send is larger than 16382 (or even 16378) bytes.
    Where is that limitation? As I can see there is quint16 (64k) buffer size which gives me 32k files transfer with DataStream serialization.

    What is your suggestion? How to change my protocol at network layer?
    Last edited by jboban; 26th March 2013 at 04:19.

Similar Threads

  1. Replies: 0
    Last Post: 18th August 2011, 04:36
  2. QTcpSocket write():: How many data sends?
    By Daxos in forum Qt Programming
    Replies: 3
    Last Post: 29th July 2010, 10:27
  3. QTcpSocket write() Trasmission Data Design
    By Daxos in forum Qt Programming
    Replies: 4
    Last Post: 15th July 2010, 18:19
  4. Packet handling advice with QTcpSocket?
    By zAAm in forum General Programming
    Replies: 1
    Last Post: 27th April 2010, 15:23
  5. Packet getting fragmented when sending over QTcpSocket
    By arturo182 in forum Qt Programming
    Replies: 14
    Last Post: 5th August 2009, 23:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.