Skip to content

ConvertTo-PodeSignalConnection

SYNOPSIS

Converts the current HTTP request to a Route to be a Signal (WebSocket) connection.

SYNTAX

ConvertTo-PodeSignalConnection [-Name] <String> [[-Group] <String>] [[-Scope] <String>] [[-ClientId] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Converts the current HTTP request to a Route to be an Signal (WebSocket) connection, by sending the required headers back to the client.

EXAMPLES

EXAMPLE 1

ConvertTo-PodeSignalConnection -Name 'Metrics'

EXAMPLE 2

ConvertTo-PodeSignalConnection -Name 'Metrics' -Scope Local

EXAMPLE 3

ConvertTo-PodeSignalConnection -Name 'Metrics' -Group 'admins'

EXAMPLE 4

ConvertTo-PodeSignalConnection -Name 'Metrics' -ClientId 'my-client-id'

PARAMETERS

-ClientId

An optional ClientId to use for the Signal connection, this value will be signed if signing is enabled (Default: GUID).

Type: String
Parameter Sets: (All)
Aliases:

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

-Group

An optional Group for the Signal connection, to enable broadcasting events to all connections for an Signal connection name in a Group.

Type: String
Parameter Sets: (All)
Aliases:

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

-Name

The Name of the Signal connection, which ClientIds will be stored under.

Type: String
Parameter Sets: (All)
Aliases: Path

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

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

-Scope

The Scope of the Signal connection, either Default, Local or Global (Default: Default). - If the Scope is Default, then it will be Global unless the default has been updated via Set-PodeSignalDefaultScope. - If the Scope is Local, then the Signal connection will only be opened for the duration of the request to a Route that configured it. - If the Scope is Global, then the Signal connection will be cached internally so events can be sent to the connection from Tasks, Timers, and other Routes, etc.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Default
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