Monday, May 20, 2024
Homepage · c#
 Popular · Latest · Hot · Upcoming
68
rated 0 times [  74] [ 6]  / answers: 1 / hits: 62284  / 14 Years ago, tue, january 11, 2011, 12:00:00

I have a pet project that is an online game, the entire game engine is written in C# and I would like to know if there is anyway I can call the functions of this existing assembly (.dll) from a solution built using Node.JS, Socket.IO, Express etc?



The game engine itself is pretty complete; tested and robust. I am hoping there is some neat way of exposing its functionality without too much overhead.



UPDATE:



To answer my own question a little..
I have ended building my own web socket server (based on the most current web socket protocol document). It is written in C# and compiled using Mono so that it can be hosted on a Linux box running mono and therefore (with a few tweaks) I can use my existing game engine.



UPDATE 2
A project that does exactly what I was originally looking for now exists - http://tjanczuk.github.io/edge/#/



UPDATE 3
Edge.js supporting node's last versions and .net core with a new edge-js package.




Support for Node.Js 6.x, 7.x, 8.x, 9.x, 10.x, 11.x Support for .NET
Core 1.0.1 - 2.x on Windows/Linux/macOS. Support for Mono runtime
4.8.x - 5.x.




Can be installed from https://www.npmjs.com/package/edge-js


More From » c#

 Answers
16

If all you want to do is spin up a lightweight HTTP server while still programming with C# and .Net you should give Kayak a chance. It is a lightweight HTTP Server for C# and behaves kind of like node.js in that sense.



kayakhttp



Update:



If you are looking for a lightweight HTTP Server to handle web requests you have a couple alternatives today:




  • ServiceStack (recommended)

  • Microsoft WebAPI

  • NancyFx



To my knowledge all the above work on some version of Mono, so you can still host them across both Windows and Unix based systems.


[#94285] Sunday, January 9, 2011, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hallie

Total Points: 503
Total Questions: 114
Total Answers: 103

Location: Iraq
Member since Fri, Jun 5, 2020
4 Years ago
;