http://www.perlmonks.org?node_id=235053

jhanna has asked for the wisdom of the Perl Monks concerning the following question:

ASSP.sf.net is an Anti-Spam SMTP Proxy written in perl. It uses IO::Socket::INET and IO::Select to multiplex socket connections from SMTP clients and to the mail transport.

For some reason it's dropping bytes. It's not in my perl code, because it happens at irregular intervals, but one user found this pattern:

There is a pattern to the first bad byte, but I haven't figured it out
yet...

The pattern seems to be based on a 285K byte (291840) cycle

After the first 57 bytes lost the system will:
successfully transfer 291783 bytes 
loose another 57
successfully transfer 291783 bytes 
loose another 57
successfully transfer 291783 bytes 
loose another 57
Etc...etc....

Test .125-meg.mpeg           128000
              Verified OK

Test .25-meg.mpeg            255943
              Missing Bytes, Total Len: 255943
missing: 57  Bytes at Location  141246 
              Verification Failed

Test .5-meg.mpeg             511886
              Missing Bytes, Total Len: 511886
missing: 57  Bytes at Location  187758 
missing: 57  Bytes at Location  479541 
              Verification Failed

Test 1-meg.mpeg              1023829
              Missing Bytes, Total Len: 1023829
missing: 57  Bytes at Location  207651 
missing: 57  Bytes at Location  499434 
missing: 57  Bytes at Location  791217 
              Verification Failed

My question is if there is a socket setting that will improve buffering or provide some other means of making the sockets more robust.

Thanks,
John

update (broquaint): title change (was socket problem)