Inheritance: Win32AnonymousPipe, IAnonymousPipeServer
        public AnonymousPipeServerStream(PipeDirection direction, SafePipeHandle serverSafePipeHandle, SafePipeHandle clientSafePipeHandle)
            : base(direction, DefaultBufferSize)
        {
            if (serverSafePipeHandle == null)
            {
                throw new ArgumentNullException("serverSafePipeHandle");
            }
            if (clientSafePipeHandle == null)
            {
                throw new ArgumentNullException("clientSafePipeHandle");
            }

            if (direction == PipeDirection.InOut)
            {
                throw new NotSupportedException("Anonymous pipe direction can only be either in or out.");
            }

            if (IsWindows)
            {
                impl = new Win32AnonymousPipeServer(this, serverSafePipeHandle, clientSafePipeHandle);
            }
            else
            {
                impl = new UnixAnonymousPipeServer(this, serverSafePipeHandle, clientSafePipeHandle);
            }

            InitializeHandle(serverSafePipeHandle, true, false);
            IsConnected = true;

            ClientSafePipeHandle = clientSafePipeHandle;
        }
Example #2
0
        public AnonymousPipeServerStream(PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
            : base(direction, bufferSize)
        {
            if (pipeSecurity != null)
            {
                throw ThrowACLException();
            }

            if (direction == PipeDirection.InOut)
            {
                throw new NotSupportedException("Anonymous pipe direction can only be either in or out.");
            }

            if (IsWindows)
            {
                impl = new Win32AnonymousPipeServer(this, direction, inheritability, bufferSize);
            }
            else
            {
                impl = new UnixAnonymousPipeServer(this, direction, inheritability, bufferSize);
            }

            InitializeHandle(impl.Handle, false, false);
            IsConnected = true;
        }
		public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
			: base (direction, bufferSize)
		{
			if (direction == PipeDirection.InOut)
				throw new NotSupportedException ("Anonymous pipe direction can only be either in or out.");

			if (IsWindows)
				impl = new Win32AnonymousPipeServer (this, direction, inheritability, bufferSize, pipeSecurity);
			else
				impl = new UnixAnonymousPipeServer (this, direction, inheritability, bufferSize);

			InitializeHandle (impl.Handle, false, false);
			IsConnected = true;
		}
		public AnonymousPipeServerStream (PipeDirection direction, SafePipeHandle serverSafePipeHandle, SafePipeHandle clientSafePipeHandle)
			: base (direction, DefaultBufferSize)
		{
			if (serverSafePipeHandle == null)
				throw new ArgumentNullException ("serverSafePipeHandle");
			if (clientSafePipeHandle == null)
				throw new ArgumentNullException ("clientSafePipeHandle");

			if (direction == PipeDirection.InOut)
				throw new NotSupportedException ("Anonymous pipe direction can only be either in or out.");

			if (IsWindows)
				impl = new Win32AnonymousPipeServer (this, serverSafePipeHandle, clientSafePipeHandle);
			else
				impl = new UnixAnonymousPipeServer (this, serverSafePipeHandle, clientSafePipeHandle);

			InitializeHandle (serverSafePipeHandle, true, false);
			IsConnected = true;

			ClientSafePipeHandle = clientSafePipeHandle;
		}