mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
15 lines
252 B
Nim
15 lines
252 B
Nim
discard """
|
|
file: "tasyncsend4754.nim"
|
|
output: "Finished"
|
|
"""
|
|
|
|
import asyncdispatch
|
|
|
|
proc f(): Future[void] {.async.} =
|
|
let s = newAsyncNativeSocket()
|
|
await s.connect("example.com", 80.Port)
|
|
await s.send("123")
|
|
echo "Finished"
|
|
|
|
waitFor f()
|