https://github.com/space-wizards/spacewizards.httplistener
Managed, maintained, updated, and unprofessionally butchered fork of System.Net.HttpListener
https://github.com/space-wizards/spacewizards.httplistener
csharp dotnet http http-server httplistener
Last synced: about 1 year ago
JSON representation
Managed, maintained, updated, and unprofessionally butchered fork of System.Net.HttpListener
- Host: GitHub
- URL: https://github.com/space-wizards/spacewizards.httplistener
- Owner: space-wizards
- License: mit
- Created: 2020-12-20T22:06:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T16:30:33.000Z (almost 2 years ago)
- Last Synced: 2025-04-18T06:47:31.927Z (over 1 year ago)
- Topics: csharp, dotnet, http, http-server, httplistener
- Language: C#
- Homepage:
- Size: 330 KB
- Stars: 18
- Watchers: 5
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# SpaceWizards.HttpListener [](https://www.nuget.org/packages/SpaceWizards.HttpListener)
A relatively lightweight and embeddable HTTP server for .NET. `SpaceWizards.HttpListener` is a maintained, updated, and unprofessionally butchered fork of the managed implementation of `System.Net.HttpListener` straight out of https://github.com/dotnet/runtime. This means:
* Will always use the fully managed implementation of `HttpListener`. On Windows, `System.Net.HttpListener` uses a different backend than Mac/Linux, namely the original `http.sys` backend. This functions very differently in behavior and bugs, which is unsuitable for cross-platform apps. Furthermore, binding something like `0.0.0.0:1212` with it requires admin even if a plain TCP socket would be fine otherwise.
* Bugfixes over the .NET Runtime implementation, which is basically unmaintained short of being kept around for compatibility. The original Mono implementation Mac/Linux `HttpListener` uses is quite buggy.
* You may expect some more modern innovations and maybe breaking changes. We're primarily maintaining this for [RobustToolbox](https://github.com/space-wizards/RobustToolbox) so there you go.
## Release Notes
See [RELEASE-NOTES.md](./RELEASE-NOTES.md).
## Examples
Literally any of the tutorials for `System.Net.HttpListener` will probably do. There are also our usages in Robust:
* [Simple HTTP server for game server control and querying APIs](https://github.com/space-wizards/RobustToolbox/tree/4d707c86cbfa5814cfa8b406dfd315fd1ad9948b/Robust.Server/ServerStatus)
* [Alternative HTTP server implementation for prometheus-net](https://github.com/space-wizards/RobustToolbox/blob/4d707c86cbfa5814cfa8b406dfd315fd1ad9948b/Robust.Server/DataMetrics/MetricsManager.MetricsServer.cs)