awaits asynchronous operations
awaits the result of a task.
EXAMPLE 1
PipeScript -ScriptBlock {
await $Websocket.SendAsync($SendSegment, 'Binary', $true, [Threading.CancellationToken]::new($false))
}EXAMPLE 2
PipeScript -ScriptBlock {
$receiveResult = await $Websocket.ReceiveAsync($receiveSegment, [Threading.CancellationToken]::new($false))
}| Type | Required | Position | PipelineInput |
|---|---|---|---|
[CommandAst] |
true | 1 | true (ByValue) |
Await [-CommandAst] <CommandAst> [<CommonParameters>]