farham/signalrhubcore3

By farham

Updated over 6 years ago

SignalrHub dot net core 3 + Js + helper js

Image
0

9.7K

farham/signalrhubcore3 repository overview

Signalr Hub , your connection will be in signalRHub object Import two files to your project


script src="js/signalr/dist/browser/signalr.js

script src="js/signalrhub.js


assign a function for receiving messages to initial the hub


function reciveMessage(msg){ alert(msg); } signalRHub.init(reciveMessage);


The function return connection and you can see your connection id

for send just call signalRHub.sendAll("message");

the other options are here

sendAll(message) sendOthers:(message) sendOne(message, connectionId) sendGroup(message, groupId) sendOtherInGroup(message, groupId) joinGroup(groupName)

  • groupId can be anything, anyone can be part of a group by initial as a group

Tag summary

Content type

Image

Digest

Size

184.8 MB

Last updated

over 6 years ago

docker pull farham/signalrhubcore3