[OTR-dev] Fragment creation?

Alex alex323 at gmail.com
Sat May 20 08:58:02 EDT 2006


Hello. I was pondering about how I would go about creating fragmented
messages which take into account the size of the header. The header is
variable length as strlen("?OTR,1,3,") != strlen("?OTR,1,20,"). A dirty
way of working it out would be find out how many packets there would be
and then work out how large the headers will be, rework-out how many
headers there will be, then rerework out how many headers, then for each
of those, take into account how long the variable headers add, then
rererework-out... no this is getting nasty. Does anyone know of a
solution to this problem? I want to deviate from the protocol slightly
and make the headers static length. strlen("?OTR,00001,00003,") ==
strlen("?OTR,00001,00020,"). Would this break any current
implementations? Is this necessary?

 - Alex



More information about the OTR-dev mailing list