Documentation for method
write assembled from the following types:
method write(IO::Handle: Blob --> True)
$buf to the filehandle. This method can be called even when the handle is not in binary mode.
multi method write(|)
method write(IO::Socket: Blob )
Writes the supplied buffer to the socket, thus sending it to other end of the connection. The string version is method print.
Fails if the socket is not connected.
method write(Blob --> Promise)
This method will attempt to send the bytes in
$b on the IO::Socket::Async that will have been obtained indirectly via
listen, returning a Promise that will be kept with the number of bytes sent or broken if there was an error sending.
method write(Proc::Async: Blob , : = --> Promise)
Write the binary data in
$b to the standard input stream of the external program.
Returns a Promise that will be kept once the data has fully landed in the input buffer of the external program.
Proc::Async object must be created for writing (with
Proc::Async.new(:w, $path, @args)). Otherwise an X::Proc::Async::OpenForWriting exception will the thrown.
start must have been called before calling method write, otherwise an X::Proc::Async::MustBeStarted exception is thrown.