/// <summary> /// Send the events over a network as UDP packets. /// </summary> /// <param name="remoteAddress">The address of the remote host or multicast group to which the underlying UdpClient should send the audit events.</param> /// <param name="remotePort">The port number of the remote host or multicast group to which the underlying UdpClient should send the audit events.</param> /// <param name="multicastMode">The multicast mode.</param> /// <param name="customSerializer">A custom serialization method, or NULL to use the json/UTF-8 default</param> /// <param name="customDeserializer">A custom deserialization method, or NULL to use the json/UTF-8 default</param> /// <returns></returns> public static ICreationPolicyConfigurator UseUdp(this IConfigurator configurator, IPAddress remoteAddress, int remotePort, MulticastMode multicastMode = MulticastMode.Auto, Func <AuditEvent, byte[]> customSerializer = null, Func <byte[], AuditEvent> customDeserializer = null) { Configuration.DataProvider = new UdpDataProvider() { RemoteAddress = remoteAddress, RemotePort = remotePort, MulticastMode = multicastMode, CustomSerializer = customSerializer, CustomDeserializer = customDeserializer }; return(new CreationPolicyConfigurator()); }
public IUdpProviderConfigurator MulticastMode(MulticastMode mode) { _multicastMode = mode; return(this); }