コード例 #1
0
ファイル: Pipe.cs プロジェクト: Orvid/NAntUniversalTasks
        /// <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();
        }
コード例 #2
0
ファイル: Pipe.cs プロジェクト: Orvid/NAntUniversalTasks
		/// <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();
		}