Exemplo n.º 1
0
        public void Send(SyslogMessage message)
        {
            var dgram = string.Format(
                "<{0}>{1}: {2} {3}",
                message.Priority,
                message.LocalTimeStamp.ToString("MMM dd HH:mm:ss"),
                System.Environment.MachineName,
                message.Text);


            var buf = System.Text.Encoding.ASCII.GetBytes(dgram);

            lock (m_SocketSync)
            {
                open();
                m_UdpClient.Send(buf, buf.Length);
            }
        }
Exemplo n.º 2
0
         public void Send(SyslogMessage message)
         {
           var dgram = string.Format(
                                    "<{0}>{1}: {2} {3}",
                                    message.Priority,
                                    message.LocalTimeStamp.ToString("MMM dd HH:mm:ss"),
                                    System.Environment.MachineName,
                                    message.Text);
                    

           var buf = System.Text.Encoding.ASCII.GetBytes(dgram);
           
           lock(m_SocketSync)
           {
             open();
             m_UdpClient.Send(buf, buf.Length);
           }
         }