|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR.Hubs;
using System.Threading.Tasks;
namespace OnlineWhiteBoard_4.SignalR
{
[HubName("whiteboardHub")]
public class WhiteboardHub : Hub
{
public void JoinGroup( string groupName)
{
Groups.Add(Context.ConnectionId, groupName);
}
public void JoinChat(string name, string groupName)
{
Clients.Group(groupName).ChatJoined(name);
}
public void SendDraw(string drawObject, string sessionId, string groupName,string name)
{
Clients.Group(groupName).HandleDraw(drawObject, sessionId, name);
}
public void SendChat( string message, string groupName,string name)
{
Clients.Group(groupName).Chat(name, message);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
My passion is to learn, analyze, design (OOAD), architect, code and work with all team members to create competitive products in the market using efficient ways.
Interested area are .NET, MVC, client-side development, OData, SQL Server BI Solutions( SSAS & SSRS) ,PHP, MySQL, Visual Studio Automation&Performance Testing, Agile development and architect Frameworks and application integration solutions