UdpSocket.sendTo
DatagramResult sendTo(scope const(ubyte)[] data, scope const(char)[] host, ushort port) @trustedSend a datagram to a specific destination.
In WSAPoll mode, data is borrowed directly by the OS sendto call (Borrow semantics). In IOCP overlapped mode, data is copied into an internal buffer (Copy semantics). In both cases the caller may reuse or free the buffer immediately after this call returns.
Parameters
data | Datagram payload to send. |
host | Destination host name or IP address. |
port | Destination port number. |
Returns
Result indicating success or failure reason.