print-to
ErrorsCollection

print-to

Synthesised documentation from type/IO/Socket/Async

From type/IO/Socket/Async

See Original text in context

method print-to(IO::Socket::Async:D: Str() $hostInt() $portStr() $str --> Promise)

This is the equivalent of print for UDP sockets that have been created with the udp method, it will try send a UDP message of $str 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.