Combined from primary sources listed below.
See primary docmentation in context for method write.
method write(IO::Socket:D: Blob:D $buf)
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.
See primary docmentation in context for method write.
method write-to(IO::Socket::Async:D: Str() $host, Int() $port, Blob $b --> Promise)
This is the equivalent of write for UDP sockets that have been created with the udp method. It will try send a UDP message comprised of the bytes in the Blob $b to the specified $host and $port returning a Promise that will be kept when the data is successfully sent or broken if it was unable to send the data. In order to send to a broadcast address the :broadcast flag must have been specified when the socket was created.
See primary docmentation in context for method write.
method write(IO::Socket::Async:D: Blob $b --> Promise)
This method will attempt to send the bytes in $b on the IO::Socket::Async that will have been obtained indirectly via connect or listen, returning a Promise that will be kept with the number of bytes sent or broken if there was an error sending.
See primary docmentation in context for method write.
method write(Proc::Async:D: Blob:D $b, :$scheduler = $*SCHEDULER --> Promise:D)
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.
The 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.
See primary docmentation in context for method write.
method write-int64(buf8: uint $pos, Int:D $value, $endian = NativeEndian --> buf8:D)
Writes a signed 64-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-bits(buf8:D: uint $pos, uint $bits, Int:D $value --> Nil)
Writes a signed integer value for the bits from the given bit offset and given number of bits. The endianness of the bits is assumed to be BigEndian. Always returns Nil.
See primary docmentation in context for method write.
method write-num32(buf8: uint $pos, num32 $value, $endian = NativeEndian --> buf8:D)
Writes a native num32 IEEE floating point value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-ubits(buf8:D: uint $pos, uint $bits, UInt:D $value --> Nil)
Writes an unsigned integer value to the bits from the given bit offset and given number of bits. The endianness of the bits is assumed to be BigEndian. Always returns Nil.
See primary docmentation in context for method write.
method write-int32(buf8: uint $pos, int32 $value, $endian = NativeEndian --> buf8:D)
Writes a signed 32-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint32(buf8:D: uint $pos, uint32 $value, $endian = NativeEndian --> Nil)
Writes an unsigned 32-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint64(buf8:D: uint $pos, uint64 $value, $endian = NativeEndian --> Nil)
Writes an unsigned 64-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-int64(buf8:D: uint $pos, Int:D $value, $endian = NativeEndian --> Nil)
Writes a signed 64-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-num64(buf8:D: uint $pos, num64 $value, $endian = NativeEndian --> Nil)
Writes a native num64 IEEE floating point value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint8(buf8: uint $pos, uint8 $value, $endian = NativeEndian --> buf8:D)
Writes an unsigned 8-bit integer value at the given position. The $endian parameter has no meaning, but is available for consistency.
See primary docmentation in context for method write.
method write-int128(buf8:D: uint $pos, Int:D $value, $endian = NativeEndian --> Nil)
Writes a signed 128-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-num64(buf8: uint $pos, num64 $value, $endian = NativeEndian --> buf8:D)
Writes a native num64 IEEE floating point value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint64(buf8: uint $pos, uint64 $value, $endian = NativeEndian --> buf8:D)
Writes an unsigned 64-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-num32(buf8:D: uint $pos, num32 $value, $endian = NativeEndian --> Nil)
Writes a native num32 IEEE floating point value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-int32(buf8:D: uint $pos, int32 $value, $endian = NativeEndian --> Nil)
Writes a signed 32-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-int8(buf8:D: uint $pos, int8 $value, $endian = NativeEndian --> Nil)
Writes a signed 8-bit integer value at the given position. The $endian parameter has no meaning, but is available for consistency.
See primary docmentation in context for method write.
method write-int16(buf8: uint $pos, int16 $value, $endian = NativeEndian --> buf8:D)
Writes a signed 16-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-int16(buf8:D: uint $pos, int16 $value, $endian = NativeEndian --> Nil)
Writes a signed 16-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-int128(buf8: uint $pos, Int:D $value, $endian = NativeEndian --> buf8:D)
Writes a signed 128-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint16(buf8:D: uint $pos, uint16 $value, $endian = NativeEndian --> Nil)
Writes an unsigned 16-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint128(buf8:D: uint $pos, UInt:D $value, $endian = NativeEndian --> Nil)
Writes an unsigned 128-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-ubits(buf8: uint $pos, uint $bits, UInt:D $value --> buf8:D)
Writes an unsigned integer value to the bits from the given bit offset and given number of bits. The endianness of the bits is assumed to be BigEndian.
See primary docmentation in context for method write.
method write-int8(buf8: uint $pos, int8 $value, $endian = NativeEndian --> buf8:D)
Writes a signed 8-bit integer value at the given position. The $endian parameter has no meaning, but is available for consistency.
See primary docmentation in context for method write.
method write-bits(buf8: uint $pos, uint $bits, Int:D $value --> buf8:D)
Writes a signed integer value for the bits from the given bit offset and given number of bits. The endianness of the bits is assumed to be BigEndian.
See primary docmentation in context for method write.
method write-uint8(buf8:D: uint $pos, uint8 $value, $endian = NativeEndian --> Nil)
Writes an unsigned 8-bit integer value at the given position. The $endian parameter has no meaning, but is available for consistency.
See primary docmentation in context for method write.
method write-uint128(buf8: uint $pos, UInt:D $value, $endian = NativeEndian --> buf8:D)
Writes an unsigned 128-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint32(buf8: uint $pos, uint32 $value, $endian = NativeEndian --> buf8:D)
Writes an unsigned 32-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write-uint16(buf8: uint $pos, uint16 $value, $endian = NativeEndian --> buf8:D)
Writes an unsigned 16-bit integer value at the given position with the given endianness.
See primary docmentation in context for method write.
method write(IO::Handle:D: Blob:D $buf --> True)
Writes $buf to the filehandle. This method can be called even when the handle is not in binary mode.