pipe.write_stream

Functions

new() → pipe.write_stream

new()                    (1)
new(fd: file_descriptor) (2)
1 Default constructor.
2 Converts a file descriptor into a pipe end.

close(self)

Close the pipe.

Any asynchronous write operations will be cancelled immediately, and will complete with the boost::asio::error::operation_aborted error.

cancel(self)

Cancel all asynchronous operations associated with the pipe.

This function causes all outstanding asynchronous write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation_aborted error.

assign(self, fd: file_descriptor)

Assign an existing native pipe to self.

release(self) → file_descriptor

Release ownership of the native descriptor implementation.

This function causes all outstanding asynchronous write operations to finish immediately, and the handlers for cancelled operations will be passed the boost::asio::error::operation_aborted error. Ownership of the native pipe is then transferred to the caller.

write_some(self, buffer: byte_span) → integer

Write data to the pipe and blocks current fiber until it completes or errs.

Returns the number of bytes written.

Properties

is_open: boolean

Whether the pipe is open.