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

Mono.Unix.UnixStream.SendTo Method

Copies data from this stream to the specified file descriptor out_fd.

[System.CLSCompliant(false)]
public void SendTo (int out_fd, ulong count)

See Also

Mono.Unix.Native.Syscall.sendfile

Parameters

out_fd
A int containing the file descriptor to copy the current stream contents to.
count
A ulong containing the number of bytes to copy from the current stream into out_fd.

Exceptions

TypeReason
ArgumentException

Mono.Unix.UnixStream.Handle was not opened for reading or out_fd was not opened for writing. [Mono.Unix.Native.Errno.EBADF]

-or-

Descriptor is not valid or locked. [Mono.Unix.Native.Errno.EINVAL]

ObjectDisposedException The stream has been closed.
System.IO.IOException Unspecified error while reading from UnixStream.Handle. [Mono.Unix.Native.Errno.EIO]
Mono.Unix.UnixIOException

Non-blocking I/O has been selected using Mono.Unix.Native.OpenFlags.O_NONBLOCK and the write would block. [Mono.Unix.Native.Errno.EAGAIN]

-or-

Insufficient memory to read from UnixStream.Handle. [Mono.Unix.Native.Errno.ENOMEM]

Remarks

This performs an in-kernel copy between the file descriptor UnixStream.Handle and out_fd. Either or both may be a socket.

Requirements

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