public DuplexAnonymousPipeClient(AnonymousPipeClientStream sender, AnonymousPipeClientStream receiver, ChannelSettings? settings = null)
        {
            if (sender == null) throw new ArgumentNullException(nameof(sender));
            if (receiver == null) throw new ArgumentNullException(nameof(receiver));

            channel = new DuplexPipeChannel(sender, receiver, settings);
        }
Пример #2
0
        public DuplexPipeChannel(PipeStream outStream, PipeStream inStream, ChannelSettings?settings = null)
        {
            this.settings  = settings ?? ChannelSettings.Default;
            this.OutStream = outStream;
            this.InStream  = inStream;

            thrCancelTokens = new CancellationTokenSource();

            listentingTask = Task.Factory.StartNew(Listener, this, TaskCreationOptions.LongRunning);
        }
 public DuplexAnonymousPipeServer(AnonymousPipeServerStream sender, AnonymousPipeServerStream receiver, ChannelSettings? settings = null)
 {
     channel = new DuplexPipeChannel(sender, receiver, settings);
 }
 public DuplexAnonymousPipeServer(ChannelSettings? settings = null)
     : this(sender: new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable),
            receiver: new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable),
            settings: settings)
 {
 }
 public DuplexAnonymousPipeClient(string senderHandle, string receiverHandle, ChannelSettings? settings = null)
     : this(sender: new AnonymousPipeClientStream(PipeDirection.Out, receiverHandle),
            receiver: new AnonymousPipeClientStream(PipeDirection.In, senderHandle),
            settings: settings)
 {
 }