Inheritance: Win32AnonymousPipe, IAnonymousPipeServer
Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
		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;
		}
Ejemplo n.º 4
0
		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;
		}