method write-to

Documentation for method write-to assembled from the following types:

class IO::Socket::Async

From IO::Socket::Async

(IO::Socket::Async) method write-to

method write-to(IO::Socket::Async:D: Str() $hostInt() $portBlob $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.