Skip to content

Send-PodeWebSocket

SYNOPSIS

Send a message back to a WebSocket connection.

SYNTAX

Send-PodeWebSocket [[-Name] <String>] [[-Message] <Object>] [[-Depth] <Int32>] [[-Type] <String>]
 [<CommonParameters>]

DESCRIPTION

Send a message back to a WebSocket connection.

EXAMPLES

EXAMPLE 1

Send-PodeWebSocket -Name 'Example' -Message @{ message = 'Hello, there' }

PARAMETERS

-Depth

An optional Depth to parse any JSON or XML messages. (default: 10)

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 10
Accept pipeline input: False
Accept wildcard characters: False

-Message

The Message to send. Can either be a raw string, hashtable, or psobject. Non-strings will be parsed to JSON, or the WebSocket's ContentType.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

The Name of the WebSocket connection (optional if in the scope where $WsEvent is available).

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type

An optional message Type. (default: Text)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: Text
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Back to top