Mono Class Library: Mono.Unix.UnixStream Overview | Members

Mono.Unix.UnixStream Constructor

Creates and initializes a Mono.Unix.UnixStream instance, wrapping the specified file descriptor fileDescriptor.

public UnixStream (int fileDescriptor, bool ownsHandle)

Parameters

fileDescriptor
A int containing a file descriptor.
ownsHandle
A bool specifying whether or not the created Mono.Unix.UnixStream instance "owns" fileDescriptor.

Exceptions

TypeReason
ArgumentExceptionfileDescriptor is equal to UnixStream.InvalidFileDescriptor.

Remarks

If ownsHandle is true, then fileDescriptor will be closed via Mono.Unix.Native.Syscall.close when UnixStream.Close is invoked (which is also called from the finalizer and from the IDisposable implementation). Otherwise, fileDescriptor will only be flushed on UnixStream.Close and not actually closed.

Requirements

Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0