public static function encodeMessage($message)
    {
        $waitingData = strlen($message);
        $header = str_pad((string)$waitingData,8,'0',STR_PAD_LEFT);
        return $header.$message;
    }