20 lines
557 B
C#
20 lines
557 B
C#
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using Microsoft.AspNet.SignalR;
|
|
|
|
namespace SignalRServer
|
|
{
|
|
public class ChatHub : Hub
|
|
{
|
|
public void Send(string name, string message)
|
|
{
|
|
// Call the broadcastMessage method to update clients.
|
|
Clients.All.broadcastMessage(name, message);
|
|
}
|
|
}
|
|
} |