internal NamedPipeConnectionListener( string localEndPointName, ConnectionListenerSettings settings = null) { _localEndPointName = localEndPointName ?? throw new ArgumentNullException("localEndPointName"); _settings = settings ?? new ConnectionListenerSettings(); if ((_settings.NewConnectionSettings?.UseBufferedStream).GetValueOrDefault()) { throw new NotSupportedException(); } if (string.IsNullOrWhiteSpace(localEndPointName)) { throw new ArgumentException("Invalid pipename", nameof(localEndPointName)); } }
internal TcpConnectionListener(IPEndPoint localEndPoint, ConnectionListenerSettings settings = null) { _localEndPoint = localEndPoint ?? throw new ArgumentNullException(nameof(localEndPoint)); _settings = settings ?? new ConnectionListenerSettings(); }
public static IConnectionListener CreateMultiPeerServer(IPAddress localIp, int localPort, ConnectionListenerSettings settings = null) => CreateMultiPeerServer(new IPEndPoint(localIp, localPort), settings);
public static IConnectionListener CreateMultiPeerServer(string localNamedPipeName, ConnectionListenerSettings settings = null) => ServiceRef.Create <IConnectionListener>(new NamedPipeConnectionListener(localNamedPipeName, settings));
public static IConnectionListener CreateMultiPeerServer(IPEndPoint localEndPoint, ConnectionListenerSettings settings = null) => ServiceRef.Create <IConnectionListener>(new TcpConnectionListener(localEndPoint, settings));