Share via


ConnectionExtensions.Broadcast Method

.NET Framework 4

Broadcasts a value to all connections, excluding the connection ids specified.

Namespace:  Microsoft.AspNet.SignalR
Assembly:  Microsoft.AspNet.SignalR.Core (in Microsoft.AspNet.SignalR.Core.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Broadcast ( _
    connection As IConnection, _
    value As Object, _
    ParamArray excludeConnectionIds As String() _
) As Task
'Usage
Dim connection As IConnection 
Dim value As Object 
Dim excludeConnectionIds As String()
Dim returnValue As Task 

returnValue = connection.Broadcast(value, _
    excludeConnectionIds)
public static Task Broadcast(
    this IConnection connection,
    Object value,
    params string[] excludeConnectionIds
)
[ExtensionAttribute]
public:
static Task^ Broadcast(
    IConnection^ connection, 
    Object^ value, 
    ... array<String^>^ excludeConnectionIds
)
static member Broadcast : 
        connection:IConnection * 
        value:Object * 
        excludeConnectionIds:string[] -> Task
public static function Broadcast(
    connection : IConnection, 
    value : Object, 
    ... excludeConnectionIds : String[]
) : Task

Parameters

  • excludeConnectionIds
    Type: System.String[]
    The list of connection ids to exclude

Return Value

Type: System.Threading.Tasks.Task
A task that represents when the broadcast is complete.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.100) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.100).

See Also

Reference

ConnectionExtensions Class

Microsoft.AspNet.SignalR Namespace