public SyslogListener(SyslogParser parser, UdpClient udpClient, int parseProcessCount = 4)
 {
     _parser             = parser;
     _parseProcessCount  = parseProcessCount;
     _udpListener        = new UdpListener(udpClient);
     _udpListener.Error += UdpListener_Error;
     _udpBuffer          = new BatchingQueue <UdpPacket>();
     // hook buffer to UdpListener output
     _udpListener.Subscribe(_udpBuffer);
 }
 public SyslogListener(SyslogParser parser, IPAddress address, int port = 514,
                       int udpBufferSize = 500 * 1024 * 1024, int parseProcessCount = 4)
 {
     _parser             = parser;
     _parseProcessCount  = parseProcessCount;
     _udpListener        = new UdpListener(address, port, udpBufferSize);
     _udpListener.Error += UdpListener_Error;
     _udpBuffer          = new BatchingQueue <UdpPacket>();
     // hook buffer to UdpListener output
     _udpListener.Subscribe(_udpBuffer);
 }