0

I have a Node.js Http Server and Socket.IO running for my web app keeping all the clients in sync in real time. I'm pushing node events out from the client and from the node server, both broadcasts and to individual "rooms". This stuff is amazing.

Now, I have a use case where I would like to emit out a node.js event with a few params from c# code behind, inside a web service call.

[WebMethod] 
public MyMethod() 
{ 
    // emit node.js event
}

I thought about having a simple html page that requests querystring params and has node initialized in it. And c# code behind just does a http web request calling the url with the params? Not sure if that will work or be efficient, but first idea off the top of my head.

Any ideas or recommendations how to approach this one? Currently, I'm limited to .NET 4.0

8
  • Where does this C# code reside, on the client or the server? Commented Feb 11, 2014 at 18:55
  • This C# code for the web service resides on the middleware server. Commented Feb 11, 2014 at 18:59
  • I usually associate "Code behind" with the event handlers that operate behind the scenes in an ASP.NET web page or other UI framework. What is the context of "code behind" here? Commented Feb 11, 2014 at 19:00
  • This web service code behind is for... [WebMethod] public MyMethod() { //run code here } Commented Feb 11, 2014 at 19:05
  • tjanczuk.github.io/edge/# ... although that may work in the opposite direction only. Commented Feb 11, 2014 at 19:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.