# sendTo

`import { sendTo } from "destack:net";`

Send one datagram to a remote endpoint.

```ds title="sendTo"
export function sendTo(socket: &'a DatagramSocket, address: SocketAddress, buffer: &'b readonly [uint8], flags: SocketMessageFlags): AsyncResult<uint64, HostError>
```

[language/library/src/net/net.ds:112:119](https://github.com/destack-sh/destack/blob/main/language/library/src/net/net.ds#L112-L119)
