public NWConnection(NWEndpoint endpoint, NWParameters parameters) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } InitializeHandle(nw_connection_create(endpoint.Handle, parameters.Handle)); }
public NWConnectionGroup(NWMulticastGroup groupDescriptor, NWParameters parameters) { if (groupDescriptor == null) { throw new ArgumentNullException(nameof(groupDescriptor)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } InitializeHandle(nw_connection_group_create(groupDescriptor.GetCheckedHandle(), parameters.GetCheckedHandle())); }
public static NWListener Create(NWParameters parameters) { IntPtr handle; if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } handle = nw_listener_create(parameters.Handle); if (handle == IntPtr.Zero) { return(null); } return(new NWListener(handle, owns: true)); }
public static NWListener Create(NWConnection connection, NWParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } if (connection == null) { throw new ArgumentNullException(nameof(connection)); } var handle = nw_listener_create_with_connection(connection.Handle, parameters.Handle); if (handle == IntPtr.Zero) { return(null); } return(new NWListener(handle, owns: true)); }