socket (tcp) buffer status

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • deimoss

    socket (tcp) buffer status

    Hi.
    I write an application that send data using GPRS connection. No data
    can be lost, but I loose some :(. When GSM signal is lost, I get no
    error after writing data to socket. Is that possible to get status of
    the TCP buffer? I'd like to check if the buffer is empty, and if no,
    recover the data to my buffer. How to cope with that?

    Regards,
    deimoss
  • Knight

    #2
    Re: socket (tcp) buffer status

    On Mar 14, 7:48 am, deimoss <marek.jary...@ gmail.comwrote:
    Hi.
    I write an application that send data using GPRS connection. No data
    can be lost, but I loose some :(. When GSM signal is lost, I get no
    error after writing data to socket. Is that possible to get status of
    the TCP buffer? I'd like to check if the buffer is empty, and if no,
    recover the data to my buffer. How to cope with that?
    >
    Regards,
    deimoss
    Shouldn't TCP at the other endpoint take care of that? It will receive
    a mismatch in TCP segment length and actual segment data and will ask
    your TCP to retransmit. Why do you need to worry about retransmitting
    data from your TCP buffer?

    Comment

    • Walter Roberson

      #3
      [OT] Re: socket (tcp) buffer status

      In article <e9cdf39c-ae6f-4b53-8ce2-e5fb35380531@q7 8g2000hsh.googl egroups.com>,
      Knight <knighttof3@yah oo.comwrote:
      >On Mar 14, 7:48=A0am, deimoss <marek.jary...@ gmail.comwrote:
      >Hi.
      >I write an application that send data using GPRS connection. No data
      >can be lost, but I loose some :(. When GSM signal is lost, I get no
      >error after writing data to socket. Is that possible to get status of
      >the TCP buffer? I'd like to check if the buffer is empty, and if no,
      >recover the data to my buffer. How to cope with that?
      >Shouldn't TCP at the other endpoint take care of that? It will receive
      >a mismatch in TCP segment length and actual segment data and will ask
      >your TCP to retransmit. Why do you need to worry about retransmitting
      >data from your TCP buffer?
      [OT]
      In some situations, when a connection is lost, it is necessary
      to open a new connection and retransmit from the first byte not
      known to have arrived at the other end. On the other hand, in
      such cases, the application would normally be managing retransmissions
      rather than relying on the TCP stack to manage them. Handling this
      kind of thing by "peeking" at the TCP stack buffers is usually
      messier and more error prone (race conditions) -- and requires deep
      system-dependant knowledge of how the system handles its TCP buffers.

      None of this can be handled by standard C, as C itself does not know
      anything about networking; the OP would need to consult the details
      of the OS.
      --
      "Nothing recedes like success." -- Walter Winchell

      Comment

      Working...