TCP keep-alive mode when it goes into? - Networking

This is a discussion on TCP keep-alive mode when it goes into? - Networking ; I want to send big image data from linux box to windows client.. From Linux server socket , it just send while ( end of file ) { write ( clientfd ... ) } On the client , it just ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: TCP keep-alive mode when it goes into?

  1. TCP keep-alive mode when it goes into?

    I want to send big image data from linux box to windows client..

    From Linux server socket , it just send

    while ( end of file )
    {
    write ( clientfd ... )
    }

    On the client , it just receive...

    while ( read (socketfd , , ) ) ;


    Normally, it send whole data to windows clients...
    but , it sometimes , it entered to KEEP-ALIVE mode even though it is
    not end of image data ..
    and stop its sending... just keep only TCP connection..


    I don't know why it goes into KEPP-ALIVE mode?
    When I capture TCP packet , I can see follwings...


    No Time source Desti Protocol Info
    6514 27.04555 x y TCP [TCP Keep-Alive]
    5001 > 4656 [ACK] seq=5560059 ACk=0 Win=5840


    Have a nice day.



  2. Re: TCP keep-alive mode when it goes into?

    google-rambo88 wrote:
    > I want to send big image data from linux box to windows client..
    >
    > From Linux server socket , it just send
    >
    > while ( end of file )
    > {
    > write ( clientfd ... )
    > }
    >
    > On the client , it just receive...
    >
    > while ( read (socketfd , , ) ) ;


    You cannot assume that read() and write() respectively read and write
    the complete byte count that you specify for a TCP socket; you have to
    monitor the return values.

    Robert

    > [snip]


+ Reply to Thread