Acking Log
Acking
Nirva == Ick
<ick> i was thinking about a method of putting data in a queue, with an id...
<zippy> *unless* the host you're sending the packets to does a crc
<zippy> when the file(or whatever) is finished
<ick> no, this is for tunachat, it might be an entire message in one packet
<ick> then, when the write socket is ready, i check for info on queue, if so, i send
<ick> it
<zippy> but if you're not sure your packet will get there how can you
<zippy> be sure your ack will get back to you?
<ick> im not, if the ack doesn't get back in timeout period, i resned packet
<ick> if no response after like 10 resends, then we decalre thema dead source
<zippy> will it keep trying to ack?
<zippy> oh ok
<zippy> hmmm...good idea
<ick> but, how to implement the timeout
<ick> when i send out info on the queue, i was thinking about antoher array, with the
<ick> id and time, and when i recieve acks, i cehck for the ack id, and where that i
<ick> d is in the array, then i clear that entry from array
<zippy> you were saying something about queues?
<ick> and deallocate memroyy for that packet
<zippy> that would work
<ick> i coudl occasially (.5seconds) check in array of times and ids, if the ack peri
<ick> od ran out, if so, i coudl resend the packet and mark it as resent with new tim
<ick> e
<zippy> is mem allocation/deallocation necesary for such small
<zippy> messages?
<ick> its not hard, so why not, what if i queue up 1000 message because i decided to
<ick> hodl odwn the middle mouse button for too long :]
<zippy> yes...
<ick> yes, that woudl owrk, becasue then i can set my timeout to check for i/o on soc
<ick> ket to .5 seconds, and then right after it times out, i can cehck the array of
<ick> acks to see if any need to be resent
<zippy> then you're a fool :) but you can't just crash.....i guess
<zippy> you could use alloc/dealloc
<ick> yeah, its very simpel allocation, deallocation
<ick> cool! i just gfigured out acking
<zippy> sounds good