ashmind / mirrorsharp

MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror
BSD 2-Clause "Simplified" License
218 stars 39 forks source link

non owin webserver? #72

Closed davidwallis closed 6 years ago

davidwallis commented 7 years ago

Is it possible to use mirrorsharp with a web server other than using owin?

Thanks

David

ashmind commented 7 years ago

@davidwallis3101 At the moment no, however standard ones should be easy to add, please raise an issue for a specific one and I'll take a look.

davidwallis commented 7 years ago

Unfortunately Its not a standard one, it's an embedded one within https://github.com/genielabs/homegenie - which is a home automation system that is extensible with C# through codemirror - its just a bit of intellisense would help me loads 😁

The web server itself is part of the https://github.com/genielabs/mig-service-dotnet project.

I'm guessing its a non starter which is a shame.

Cheers

David

ashmind commented 7 years ago

@davidwallis3101 If you can have /mirrorsharp on a separate port, it doesn't seem impossible. The easiest solution would probably be to ignore MIG altogether and create a WebSocketSharp server separately within the same process.

The main effort would be to build a WebSocketSharp adapter as my code is optimized for MS WebSockets. However the most complex parts are not tied to a specific implementation, so it seems doable.

It's an interesting challenge — but not sure if I can justify it to myself as WebSocketSharp doesn't seem very active/popular. If you want to try it, just fork MirrorSharp as most interesting parts are internal. Then you'll have to write your own Connection, but all Handlers should be fine and JS should be fine as well.

davidwallis commented 7 years ago

That's an interesting thought - I could just use the owin server on a seperate port and see if that works as a poc :)

ashmind commented 6 years ago

I'll close this as I don't intend to implement WebSocketSharp at the moment. Let me know if you still need this and I might take another look.