Inheritance: UnixNamedPipe, INamedPipeServer
Esempio n. 1
0
 public NamedPipeServerStream(PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
     : base(direction, DefaultBufferSize)
 {
     if (IsWindows)
     {
         impl = new Win32NamedPipeServer(this, safePipeHandle);
     }
     else
     {
         impl = new UnixNamedPipeServer(this, safePipeHandle);
     }
     IsConnected = isConnected;
     InitializeHandle(safePipeHandle, true, isAsync);
 }
Esempio n. 2
0
        public NamedPipeServerStream(string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity, HandleInheritability inheritability, PipeAccessRights additionalAccessRights)
            : base(direction, transmissionMode, outBufferSize)
        {
            var rights = ToAccessRights(direction) | additionalAccessRights;

            // FIXME: reject some rights declarations (for ACL).

            if (IsWindows)
            {
                impl = new Win32NamedPipeServer(this, pipeName, maxNumberOfServerInstances, transmissionMode,
                                                rights, options, inBufferSize, outBufferSize,
                                                pipeSecurity, inheritability);
            }
            else
            {
                impl = new UnixNamedPipeServer(this, pipeName, maxNumberOfServerInstances, transmissionMode,
                                               rights, options, inBufferSize, outBufferSize, inheritability);
            }

            InitializeHandle(impl.Handle, false, (options & PipeOptions.Asynchronous) != PipeOptions.None);
        }
Esempio n. 3
0
		public NamedPipeServerStream (string pipeName, PipeDirection direction, int maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, int inBufferSize, int outBufferSize, PipeSecurity pipeSecurity, HandleInheritability inheritability, PipeAccessRights additionalAccessRights)
			: base (direction, transmissionMode, outBufferSize)
		{
			var rights = ToAccessRights (direction) | additionalAccessRights;
			// FIXME: reject some rights declarations (for ACL).

			if (IsWindows)
				impl = new Win32NamedPipeServer (this, pipeName, maxNumberOfServerInstances, transmissionMode,
								 rights, options, inBufferSize, outBufferSize,
								 pipeSecurity, inheritability);
			else
				impl = new UnixNamedPipeServer (this, pipeName, maxNumberOfServerInstances, transmissionMode,
								rights, options, inBufferSize, outBufferSize, inheritability);

			InitializeHandle (impl.Handle, false, (options & PipeOptions.Asynchronous) != PipeOptions.None);
		}
Esempio n. 4
0
		public NamedPipeServerStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
			: base (direction, DefaultBufferSize)
		{
			if (IsWindows)
				impl = new Win32NamedPipeServer (this, safePipeHandle);
			else
				impl = new UnixNamedPipeServer (this, safePipeHandle);
			IsConnected = isConnected;
			InitializeHandle (safePipeHandle, true, isAsync);
		}