Inheritance: Win32NamedPipe, INamedPipeClient
示例#1
0
		public NamedPipeClientStream (PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
			: base (direction, DefaultBufferSize)
		{
			if (IsWindows)
				impl = new Win32NamedPipeClient (this, safePipeHandle);
			else
				impl = new UnixNamedPipeClient (this, safePipeHandle);
			IsConnected = isConnected;
			InitializeHandle (safePipeHandle, true, isAsync);
		}
示例#2
0
 public NamedPipeClientStream(PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
     : base(direction, DefaultBufferSize)
 {
     if (IsWindows)
     {
         impl = new Win32NamedPipeClient(this, safePipeHandle);
     }
     else
     {
         impl = new UnixNamedPipeClient(this, safePipeHandle);
     }
     IsConnected = isConnected;
     InitializeHandle(safePipeHandle, true, isAsync);
 }
示例#3
0
        public NamedPipeClientStream(string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
            : base(ToDirection(desiredAccessRights), DefaultBufferSize)
        {
            if (impersonationLevel != TokenImpersonationLevel.None ||
                inheritability != HandleInheritability.None)
            {
                throw ThrowACLException();
            }

            if (IsWindows)
            {
                impl = new Win32NamedPipeClient(this, serverName, pipeName, desiredAccessRights, options, inheritability);
            }
            else
            {
                impl = new UnixNamedPipeClient(this, serverName, pipeName, desiredAccessRights, options, inheritability);
            }
        }
示例#4
0
		public NamedPipeClientStream (string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
			: base (ToDirection (desiredAccessRights), DefaultBufferSize)
		{
			if (impersonationLevel != TokenImpersonationLevel.None ||
			    inheritability != HandleInheritability.None)
				throw ThrowACLException ();

			if (IsWindows)
				impl = new Win32NamedPipeClient (this, serverName, pipeName, desiredAccessRights, options, inheritability);
			else
				impl = new UnixNamedPipeClient (this, serverName, pipeName, desiredAccessRights, options, inheritability);
		}