lkml.org 
[lkml]   [1999]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.2: data loss after socket close
    kuznet@ms2.inr.ac.ru wrote:
    > Yes, it looks like it read only 12 bytes of 16.
    >
    > Well, if your program really works in any OS, you should blame loudly
    > and report bug to them. 8) It is well-know tcp implemenation bug.

    You are right, the program which closes the socket after writing
    the answer packet has 4 unread bytes in his receive buffer.

    After insertion of a loop with "ioctl (sd, FIONREAD, &char_waiting)" and "read
    all waiting chars into a dummy buffer" just before i close the socket it
    works with Linux 2.2.

    I will name this #ifdef "FLUSH_INPUT" instead of "LINUX22_WORKAROUND"
    to outline that the old socket handling of the application was not correct.

    Thank you so much.

    Thorsten

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:53    [W:0.020 / U:30.372 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site