sendmsg() works fine if TTL= -1. But if I use a real value, (I've been using 6000ms) I get 8007 (msg drop req) much earlier than I should. In [buffer.cpp] CSndBuffer::readData(), the TTL test constantly fails, as the difference between p->m_OriginTime and CTimer::getTime() increases continuously. I wonder if this is because m_OriginTime is set in addBuffer(), but is not updated when the buffer is re-used? My debugging shows that addBuffer() is called for the first several packets, but not subsequently. Ideas??
-- Gary
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
AddBuffer is called when SendMsg is called (for blocking call, it may not be called immediately), so the OriginTime should be updated in AddBuffer. Did you see the value of OriginTime changes at all? I read the code again and did not see any obvious issue there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your quick response. Its all functioning as designed, apparently. My confusion was due to what OriginTime actually means. OriginTime is set when a packet is accepted into a UDT buffer, not at the time of first attempted transmit. So TTL is not the time-to-live of a packet in flight, which is what I was expecting. I have UDT_SNDSYN=1, but a blocking socket blocks when it has no buffer to accept the packet, not when it can't send due to congestion. So packets can age considerably waiting in a UDT buffer, if there is congestion. Is this correct?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sendmsg() works fine if TTL= -1. But if I use a real value, (I've been using 6000ms) I get 8007 (msg drop req) much earlier than I should. In [buffer.cpp] CSndBuffer::readData(), the TTL test constantly fails, as the difference between p->m_OriginTime and CTimer::getTime() increases continuously. I wonder if this is because m_OriginTime is set in addBuffer(), but is not updated when the buffer is re-used? My debugging shows that addBuffer() is called for the first several packets, but not subsequently. Ideas??
-- Gary
AddBuffer is called when SendMsg is called (for blocking call, it may not be called immediately), so the OriginTime should be updated in AddBuffer. Did you see the value of OriginTime changes at all? I read the code again and did not see any obvious issue there.
Thanks for your quick response. Its all functioning as designed, apparently. My confusion was due to what OriginTime actually means. OriginTime is set when a packet is accepted into a UDT buffer, not at the time of first attempted transmit. So TTL is not the time-to-live of a packet in flight, which is what I was expecting. I have UDT_SNDSYN=1, but a blocking socket blocks when it has no buffer to accept the packet, not when it can't send due to congestion. So packets can age considerably waiting in a UDT buffer, if there is congestion. Is this correct?