[Info-vax] invalid buffer size on a connect()?

Arne Vajhøj arne at vajhoej.dk
Thu May 3 21:50:35 EDT 2018


On 3/9/2018 1:52 PM, seasoned_geek wrote:
[context reinserted]
 >On 3/8/2018 2:25 PM, Arne Vajhøj wrote:
 >> On 3/8/2018 2:19 PM, seasoned_geek wrote:
 >>> On Thursday, March 8, 2018 at 8:16:45 AM UTC-6, Arne Vajhøj wrote:
 >>>> On 3/7/2018 8:06 PM, seasoned_geek wrote:
 >>>>> On Wednesday, March 7, 2018 at 6:50:29 PM UTC-6, DaveFroble wrote:
 >>>>>> seasoned_geek wrote:
 >>>>>>> I just wanted to share. I had to gut this thing to provide support
 >>>>>>> for more
 >>>>>>> than one tcp/ip stream connection. The program was single threaded
 >>>>>>> originally
 >>>>>>> and the only way to get the full TCP/IP message was a loop with a
 >>>>>>> linger set.
 >>>>>>> The first feeder machine would keep dribbling stuff out inside of
 >>>>>>> the linger,
 >>>>>>> unless it was set to one second, then you would trunc a few 
messages.
 >>>>>>
 >>>>>> What?  You're not using some protocol with a byte count?  Then
 >>>>>> you'll never know
 >>>>>> if you got everything.  Even with a 10 year linger ....
 >>>>>
 >>>>> What protocol?
 >>>>>
 >>>>> When it goes idle it's done. Idle is defined by the number of
 >>>>> seconds in the linger.
 >>>>
 >>>> That can also be considered a protocol.
 >>>>
 >>>> Just a very bad protocol.
 >>>>
 >>>> It should be changed.
 >>>
>>> Making assumptions without any knowledge of the situation is soooooooooooooooooo academic.
>>
>> That it is a bad protocol and should be changed is common sense
>> in my opinion.
>>
>> You think it is a good protocol and should not be changed?

> You have no idea where this data is coming from, what it is or why
> I'm catching it. You do not know if this is general broadcast with the life
> of a fruit fly, or a heart monitor with a patient's life in the balance.
> You do not know if the sender dynamically connects each time it senses a
> connection loss or expects a limitless hardwired lifetime connection.
> 
> You do not know

I don't know the context, because you did not provide it.

It may be a crappy design for a fruit fly or it may be a crappy
design for a heart monitor or a crappy design for something else.

But using time since last data received to detect end of data
for TCP connections is a crappy design.

Arne




More information about the Info-vax mailing list