private void send ( AuditEventMessage msg , DatagramSocket socket , InetAddress destination , int port ) throws Exception { if ( EventUtils . isEmptyOrNull ( msg ) ) { return ; } // Check to validate port int portToUse = getTransportPort ( port ) ; // Serialize and format event message for syslog byte [ ] msgBytes = getTransportPayload ( msg ) ; // Send packet send ( msgBytes , socket , destination , portToUse ) ; }
Send an audit message to a designated destination address and port using the datagram socket specified .