Page tree
Skip to end of metadata
Go to start of metadata

This hub created to let you get general ideas working with SignalR. There are nothing special. It does not even require you to be authenticated.

To get fully working code navigate to and get page source code.

To access hub you can get a link to it:

const connection = new signalR.HubConnectionBuilder()

Method 'ping(string)'

You can pass any string to this method:

    .invoke("Ping", "test message")
    .then(() => console.log("Ping request sent"))
    .catch(err => console.error(err));

Server will be returned back through client side callback 'pong' exactly the same you have sent there:

    function(msg) {
        console.log("pong: " + msg);

Get server time

Each second server will send its time through client side callback as of:

    function(clock) {
  • No labels