SignalNow is a real-time signaling service built with Azure SignalR and Azure Functions. SignalNow key features:
- Serverless.
- Real-time and easily scalable with Azure Functions and SignalR.
- Extensible authentication with integrated authentication using Microsoft Azure Active Directory, Microsoft Accounts, GitHub accounts, as well as key-based mechanism.
using System;
using Microsoft.SignalNow.Client;
string graphName = "signalnowkey"; // Use "graph.microsoft.com" for Azure Active Directory (AAD) and Microsoft Graph, or "github.com" for GitHub
string userName = "vlad"; // or "vladkol@microsoft.com" for AAD, or "vladkol" for GitHub
string company = "microsoft"; // or MSFT AAD Tenant Id, or GitHub organization name
string team = "cse"; // or any AAD group id, or GitHub team name, or * for not limiting it to a specific group
string deviceId = Guid.NewGuid().ToString(); // May be device's MAC address
// If Azure Active Directory used, the authenticating app should have permissions sufficient for calling checkMemberGroups API
// See https://docs.microsoft.com/en-us/graph/api/user-checkmembergroups?view=graph-rest-beta (as of today, it is Directory.Read.All)
string authBearer = "INSERT YOUR SIGNALNOW KEY OR BEARER TOKEN HERE";
SignalNowClient client = new SignalNowClient("mysignalnow"); // server will be resolved to mysignalnow.azurewibsites.net
client.NewMessage += async (SignalNowClient signalNow, string senderId, string messageType, string messagePayload)=>
{
switch(messageType.ToUpperInvariant())
{
case "PING":
Console.WriteLine($"Received a PING message from {senderId}. Payload: {messagePayload}");
await client.SendMessage(senderId, false, "PONG", messagePayload, true);
break;
case "PONG":
Console.WriteLine($"Received a PONG message from {senderId}");
break;
default:
break;
}
};
if (await client.Connect(userName,
deviceId,
company,
team,
authBearer,
graphName))
{
Console.WriteLine($"Connected to {client.ServerAddress} as {client.UserId}");
await client.SendMessageToAll("PING", $"Hello!", false);
}
else
{
Console.WriteLine($"Cannot connect to {client.ServerAddress}");
}
Serverless Signaling Documentation
Azure Function app (Azure/Functions/SignalNow folder)
.NET Core 2.2 Client and demo app (Client/CS/CS-Sample folder)
Unity 2018.3 app (Scripting Runtime .NET 4.x, both with .NET Standard 2.0 and .NET 4.x compatibility levels, works on iOS, Android, WinDesktop, UWP, MacOS, Client/CS/CS-Unity/SignalNowAR folder)
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.