System.IO.Pipes.NamedPipeClientStream.ConnectAsync C# (CSharp) Method

ConnectAsync() public method

public ConnectAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public System.Threading.Tasks.Task ConnectAsync() { throw null; }
        public System.Threading.Tasks.Task ConnectAsync(int timeout) { throw null; }

Same methods

NamedPipeClientStream::ConnectAsync ( System cancellationToken ) : System.Threading.Tasks.Task
NamedPipeClientStream::ConnectAsync ( int timeout ) : System.Threading.Tasks.Task
NamedPipeClientStream::ConnectAsync ( int timeout, System cancellationToken ) : System.Threading.Tasks.Task
NamedPipeClientStream::ConnectAsync ( ) : System.Threading.Task
NamedPipeClientStream::ConnectAsync ( CancellationToken cancellationToken ) : System.Threading.Task
NamedPipeClientStream::ConnectAsync ( int timeout ) : System.Threading.Task
NamedPipeClientStream::ConnectAsync ( int timeout, CancellationToken cancellationToken ) : System.Threading.Task

Usage Example

示例#1
0
 public async void StartClient(string pipeName, CancellationToken cancellationToken)
 {
     if (pipeName != null && !_configured)
     {
         Trace.Info("Connecting to named pipe {0}", pipeName);
         _outClient = new NamedPipeClientStream(".", pipeName, PipeDirection.Out, PipeOptions.Asynchronous);
         await _outClient.ConnectAsync(cancellationToken);
         _writeStream = new StreamWriter(_outClient, Encoding.UTF8);
         _configured = true;
         Trace.Info("Connection successfull to named pipe {0}", pipeName);
     }
 }
All Usage Examples Of System.IO.Pipes.NamedPipeClientStream::ConnectAsync