my $msg = pack("a".$maxMsgCodeLength."ia*",$msgCode, $port, $ip);