/// <summary> /// Places a pipe in a listening state /// </summary> public void Listen(int backlog) { // check object state if (_disposed) { throw new ObjectDisposedException(GetType().FullName); } if (_instance == null) { throw new InvalidOperationException("Pipe is not connected"); } if (_clientRequests != null) { throw new InvalidOperationException("Pipe is already listening"); } // start listening on the pipe _clientRequests = new PipeRequestQueue(_instancePool, backlog); _clientRequests.StartListening(); }
/// <summary> /// Places a pipe in a listening state /// </summary> public void Listen(int backlog) { // check object state if (_disposed) throw new ObjectDisposedException(GetType().FullName); if (_instance == null) throw new InvalidOperationException("Pipe is not connected"); if (_clientRequests != null) throw new InvalidOperationException("Pipe is already listening"); // start listening on the pipe _clientRequests = new PipeRequestQueue(_instancePool, backlog); _clientRequests.StartListening(); }