Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8392853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:37:47+00:00 2026-06-09T19:37:47+00:00

I heard SignalR is a good messaging library. I got some code for SignalR

  • 0

I heard SignalR is a good messaging library. I got some code for SignalR but I am not able to understand how it works.

JS

var hooking;
$(function() {

  hooking = $.connection.hooking;
  hooking.removeLead = function(ref) {
    $("lead" + ref).remove();
  };

  $.connection.hub.start();
});

C#

// Hooking.cs (placed in application root)
public class Hooking : Hub
{
  public void Submit(string jsonString)
  {
    var serializer = new JavaScriptSerializer();
    var json = serializer.Deserialize<HookingLeadResult>(jsonString);
    Clients.removeLead(json.Ref); // Remove lead from client hooking windows
    // update lead gen
  }
}

I have questions about the above code.

  • What does hooking mean ins $.connection.hooking;
  • Where is removeLead in hooking.removeLead
  • What will this do $.connection.hub.start(); ? What does it start? Which method it will invoke at the server side?
  • Who & how Submit method will be called at the server side? how to pass data from client side to server side. If possible please give me a url for good start for SignalR library.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:37:49+00:00Added an answer on June 9, 2026 at 7:37 pm

    The Javascript function hooking.removeLead will be invoked whenever you call Clients.removeLead(). All the bindings are done dynamically, between Javascript to C# and between C# and Javascript.

    $.connection.hub.start() is actually the connect function. It will connect your client to the server. No messages can be sent or received until you do. The start function allows you to define a callback to be called when it’s done connecting.

    The Submit method at the server will be called whenever you do a hooking.submit(json) call on your client. For instance, as a result of the user filling in some form and clicking a button.

    I recommend starting with the SignalR official wiki: http://www.asp.net/signalr

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I heard about gems like faker or populator but they are a little bit
I heard Kevin Skoglund (lynda.com) say that it is good practice to get in
I am using SignalR(https://github.com/SignalR/SignalR) in my project. From here https://github.com/SignalR/SignalR/wiki/QuickStart-Hubs I got the idea
I am writing some signal processing code in C that has a communications channel.
I'm not sure what I'm doing wrong. I've got a Ruby hash I'm passing
I heard and read that Windows/Linux OS machines are not real-time. I have read
I heard that it's possible to identify the brand of a device (or at
I heard that having @foreach inside of a view is a no-no. Meaning, the
I heard that Google can track all the static pages in a website and
I heard that you need to create images for both retina and non-retina. And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.