if (substr($msg,0,8) eq 'HTTP/1.1') {
$msg_size = length($msg);
} elsif (substr($msg,0,4) eq $accountID) {
$msg_size = 4;

} elsif ($switch eq "0066") {
$msg_size = 3;

} elsif ($switch eq "0069" && length($msg) >= unpack("S1", substr($msg, 2, 2))) {